Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to include tests for targets into build-dir #42

Closed
dileks opened this issue Jul 29, 2019 · 1 comment
Closed

Ability to include tests for targets into build-dir #42

dileks opened this issue Jul 29, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@dileks
Copy link
Contributor

dileks commented Jul 29, 2019

Hi,

while digging into CBL issue #619 I would like to have tests for clang and lld targets.

This is adapted from a previous version of my script.

[ run_tests-lld.sh ]

#!/bin/sh
  
export LANG=C
export LC_ALL=C

BUILD_DIR="$(pwd)/build/stage1"

LLD_TESTS="ELF/x86-64-retpoline-linkerscript.s ELF/x86-64-retpoline-znow-linkerscript.s ELF/x86-64-retpoline-znow.s ELF/x86-64-retpoline.s"

LLVM_LIT_OPTS="--verbose --echo-all-commands --show-all"

cd $BUILD_DIR

for t in $LLD_TESTS ; do ./bin/llvm-lit $LLVM_LIT_OPTS ./lld/test/$t ; done

I was not able to include the $LLD_TESTS from /path/to/tc-build/... to run this.

@nathanchance
Copy link
Member

Currently, this is hidden behind the --debug flag. However, I think it is worth breaking that flag up into --build-type (Debug, Release, RelWithDebInfo, etc), --tests (to build the tests), and --assertions (#40).

nathanchance added a commit to nathanchance/tc-build that referenced this issue Jul 29, 2019
Right now, the LLVM tests are only runnable when specifying '--debug'.
However, some users want to be able to run the LLVM tests on a release
build so they don't have to suffer with slower build times. The real
intention behind '--debug' was just the changing of CMAKE_BUILD_TYPE so
convert '--debug' into '--build-type' and unhook the LLVM tests from
that option.

We only save 29 targets (3783 -> 3752) by turning off LLVM_INCLUDE_TESTS
(tested with '--build-stage1-only') so there is no point in adding an
option to enable/disable that option.

LLVM_BUILD_TESTS is not needed to run tests so omit setting a value for
it.

Closes: ClangBuiltLinux#42
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
nathanchance added a commit to nathanchance/tc-build that referenced this issue Jul 29, 2019
Right now, the LLVM tests are only runnable when specifying '--debug'.
However, some users want to be able to run the LLVM tests on a release
build so they don't have to suffer with slower build times. The real
intention behind '--debug' was just the changing of CMAKE_BUILD_TYPE so
convert '--debug' into '--build-type' and unhook the LLVM tests from
that option.

We only save 29 targets (3783 -> 3752) by turning off LLVM_INCLUDE_TESTS
(tested with '--build-stage1-only') so there is no point in adding an
option to enable/disable that option.

LLVM_BUILD_TESTS is not needed to run tests so omit setting a value for
it.

Closes: ClangBuiltLinux#42
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants