Hi, I thought of many different ways to bring debci integration, but finally thought of saving the log of tests running during build and later validate it from autopkgtest due to the following reasons :- (Please correct me if you find anything wrong and please provide feedback if there is a better approach to get this right)
Since the test runs after the build and build-llvm folder is removed after the build, either I could have preserve the build-llvm compiled binaries for further testing, which won't do any good as a normal build would then won't be able to remove it, losing the values for which it is being removed or I could also have build particular binaries for a specific package during autopkgtest run, but then if clang starts to pass 100% tests then we need to write another test with mostly same pre-configurations, with most of the code similar to debian/rules So, if we take test logs for each package and validate them at autopkgtest test run would be easy to scale for other package as well when they pass 100% tests in future. Best, Reshabh Sharma
Index: llvm-toolchain-5.0-5.0.1~svn325091/debian/rules =================================================================== --- llvm-toolchain-5.0-5.0.1~svn325091.orig/debian/rules +++ llvm-toolchain-5.0-5.0.1~svn325091/debian/rules @@ -532,7 +532,8 @@ override_dh_auto_test: # LLVM tests ifneq (,$(findstring $(DEB_HOST_ARCH),$(ARCH_LLVM_TEST_OK))) - $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-llvm +# logs the output to check-llvm_build_log.txt for validation through autopkgtest + $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-llvm | tee check-llvm_build_log.txt else $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-llvm || true endif Index: llvm-toolchain-5.0-5.0.1~svn325091/debian/tests/control =================================================================== --- /dev/null +++ llvm-toolchain-5.0-5.0.1~svn325091/debian/tests/control @@ -0,0 +1,4 @@ +Tests: llvm +Depends: @ +Restrictions: build-needed + Index: llvm-toolchain-5.0-5.0.1~svn325091/debian/tests/llvm =================================================================== --- /dev/null +++ llvm-toolchain-5.0-5.0.1~svn325091/debian/tests/llvm @@ -0,0 +1,9 @@ +#!/bin/sh +# Checks llvm build passing on architectiures known to have 100% tests workings + +if grep -q "Unexpected Failure" check-llvm_build_log.txt; then + exit 1 +else + echo "build OK" +f1 +rm check-llvm_build_log.txt

