[LNT] r258052 - [test-suite-cmake] Add test for no-configure
James Molloy via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 18 09:03:29 PST 2016
Author: jamesm
Date: Mon Jan 18 11:03:29 2016
New Revision: 258052
URL: http://llvm.org/viewvc/llvm-project?rev=258052&view=rev
Log:
[test-suite-cmake] Add test for no-configure
Add a test for not running cmake if --no-configure is specified.
Modified:
lnt/trunk/lnt/tests/test_suite.py
lnt/trunk/tests/runtest/Inputs/test-suite-cmake/fake-cmake
lnt/trunk/tests/runtest/test_suite.py
Modified: lnt/trunk/lnt/tests/test_suite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/test_suite.py?rev=258052&r1=258051&r2=258052&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/test_suite.py (original)
+++ lnt/trunk/lnt/tests/test_suite.py Mon Jan 18 11:03:29 2016
@@ -177,7 +177,7 @@ class TestSuiteTest(BuiltinTest):
if opts.cxx is None:
opts.cxx = lnt.testing.util.compilers.infer_cxx_compiler(opts.cc)
if opts.cxx is not None:
- note("inferred C++ compiler under test as: %r" % (opts.cxx,))
+ note("Inferred C++ compiler under test as: %r" % (opts.cxx,))
else:
parser.error("unable to infer --cxx - set it manually.")
@@ -312,6 +312,7 @@ class TestSuiteTest(BuiltinTest):
'CMAKE_CXX_FLAGS': ' '.join([self.opts.cppflags, self.opts.cxxflags])
}
+ note('Configuring...')
subprocess.check_call([cmake_cmd, self._test_suite_dir()] +
['-D%s=%s' % (k,v) for k,v in defs.items()],
cwd=path)
@@ -323,7 +324,8 @@ class TestSuiteTest(BuiltinTest):
if self._only_test():
components = [path] + self._only_test().split('/')
subdir = os.path.join(*components)
-
+
+ note('Building...')
subprocess.check_call([make_cmd,
'-j', str(self._build_threads())],
cwd=subdir)
@@ -345,7 +347,8 @@ class TestSuiteTest(BuiltinTest):
extra_args = []
if not test:
extra_args = ['--no-execute']
-
+
+ note('Testing...')
subprocess.check_call([lit_cmd,
'-sv',
'-j', str(self._test_threads()),
Modified: lnt/trunk/tests/runtest/Inputs/test-suite-cmake/fake-cmake
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/Inputs/test-suite-cmake/fake-cmake?rev=258052&r1=258051&r2=258052&view=diff
==============================================================================
--- lnt/trunk/tests/runtest/Inputs/test-suite-cmake/fake-cmake (original)
+++ lnt/trunk/tests/runtest/Inputs/test-suite-cmake/fake-cmake Mon Jan 18 11:03:29 2016
@@ -4,5 +4,6 @@ if [[ ! -f $1/CMakeLists.txt ]]; then
exit 1
else
cp $1/fake-test $1/fake-results.json .
+ echo "Dummy" > CMakeCache.txt
exit 0
fi
Modified: lnt/trunk/tests/runtest/test_suite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/test_suite.py?rev=258052&r1=258051&r2=258052&view=diff
==============================================================================
--- lnt/trunk/tests/runtest/test_suite.py (original)
+++ lnt/trunk/tests/runtest/test_suite.py Mon Jan 18 11:03:29 2016
@@ -23,6 +23,37 @@
# CHECK-STDOUT: Added Runs : 1
# CHECK-STDOUT: Added Tests : 1
#
-# CHECK-BASIC: inferred C++ compiler under test
+# CHECK-BASIC: Inferred C++ compiler under test
+# CHECK-BASIC: Configuring
+# CHECK-BASIC: Building
+# CHECK-BASIC: Testing
# CHECK-BASIC: submitting result to dummy instance
# CHECK-BASIC: Successfully created db_None/v4/nts/1
+
+# Use the same sandbox again with --no-configure
+# RUN: lnt runtest test-suite \
+# RUN: --sandbox %t.SANDBOX \
+# RUN: --no-timestamp \
+# RUN: --no-configure \
+# RUN: --test-suite %S/Inputs/test-suite-cmake \
+# RUN: --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
+# RUN: --use-cmake %S/Inputs/test-suite-cmake/fake-cmake \
+# RUN: --use-make %S/Inputs/test-suite-cmake/fake-make \
+# RUN: --use-lit %S/Inputs/test-suite-cmake/fake-lit \
+# RUN: > %t.log 2> %t.err
+# RUN: FileCheck --check-prefix CHECK-NOCONF < %t.err %s
+# CHECK-NOCONF-NOT: Configuring
+
+# Use a different sandbox with --no-configure
+# RUN: lnt runtest test-suite \
+# RUN: --sandbox %t.SANDBOX2 \
+# RUN: --no-timestamp \
+# RUN: --no-configure \
+# RUN: --test-suite %S/Inputs/test-suite-cmake \
+# RUN: --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
+# RUN: --use-cmake %S/Inputs/test-suite-cmake/fake-cmake \
+# RUN: --use-make %S/Inputs/test-suite-cmake/fake-make \
+# RUN: --use-lit %S/Inputs/test-suite-cmake/fake-lit \
+# RUN: > %t.log 2> %t.err
+# RUN: FileCheck --check-prefix CHECK-NOCONF2 < %t.err %s
+# CHECK-NOCONF2: Configuring
More information about the llvm-commits
mailing list