ci: [refactor] Extract build_dir constant in ci-test-each-commit-exec.py
This commit is contained in:
1 file changed
+5
-4
@@ -21,11 +21,12 @@ def main():
|
|||||||
run(["git", "log", "-1"])
|
run(["git", "log", "-1"])
|
||||||
|
|
||||||
num_procs = int(run(["nproc"], stdout=subprocess.PIPE).stdout)
|
num_procs = int(run(["nproc"], stdout=subprocess.PIPE).stdout)
|
||||||
|
build_dir = "ci_build"
|
||||||
|
|
||||||
run([
|
run([
|
||||||
"cmake",
|
"cmake",
|
||||||
"-B",
|
"-B",
|
||||||
"build",
|
build_dir,
|
||||||
"-Werror=dev",
|
"-Werror=dev",
|
||||||
# Use clang++, because it is a bit faster and uses less memory than g++
|
# Use clang++, because it is a bit faster and uses less memory than g++
|
||||||
"-DCMAKE_C_COMPILER=clang",
|
"-DCMAKE_C_COMPILER=clang",
|
||||||
@@ -41,19 +42,19 @@ def main():
|
|||||||
# Tolerate unused member functions in intermediate commits in a pull request
|
# Tolerate unused member functions in intermediate commits in a pull request
|
||||||
"-DCMAKE_CXX_FLAGS=-Wno-error=unused-member-function",
|
"-DCMAKE_CXX_FLAGS=-Wno-error=unused-member-function",
|
||||||
])
|
])
|
||||||
run(["cmake", "--build", "build", "-j", str(num_procs)])
|
run(["cmake", "--build", build_dir, "-j", str(num_procs)])
|
||||||
run([
|
run([
|
||||||
"ctest",
|
"ctest",
|
||||||
"--output-on-failure",
|
"--output-on-failure",
|
||||||
"--stop-on-failure",
|
"--stop-on-failure",
|
||||||
"--test-dir",
|
"--test-dir",
|
||||||
"build",
|
build_dir,
|
||||||
"-j",
|
"-j",
|
||||||
str(num_procs),
|
str(num_procs),
|
||||||
])
|
])
|
||||||
run([
|
run([
|
||||||
sys.executable,
|
sys.executable,
|
||||||
"./build/test/functional/test_runner.py",
|
f"./{build_dir}/test/functional/test_runner.py",
|
||||||
"-j",
|
"-j",
|
||||||
str(num_procs * 2),
|
str(num_procs * 2),
|
||||||
"--combinedlogslen=99999999",
|
"--combinedlogslen=99999999",
|
||||||
|
|||||||
Reference in new issue
Block a user