diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2021-04-07 12:30:36 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2021-04-07 12:30:36 -0400 |
commit | 14f05eebc9401f197a30961a0a6048b5a22b15fa (patch) | |
tree | 1217f994d7e69f79dbaebaaf45e35dc8532e6ba5 /libtest.groovy | |
parent | 3b5e87e51e8be0035fd5bb811d18f7f598f3fbd6 (diff) | |
download | simple_pytest_test-14f05eebc9401f197a30961a0a6048b5a22b15fa.tar.gz |
Initial commit
Diffstat (limited to 'libtest.groovy')
-rw-r--r-- | libtest.groovy | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libtest.groovy b/libtest.groovy new file mode 100644 index 0000000..2e35fc4 --- /dev/null +++ b/libtest.groovy @@ -0,0 +1,25 @@ +// Obtain files from source control system. +if (utils.scm_checkout()) return + + +// Allow modification of the job configuration, affects all relevant build configs. +// Pass this object in the argument list to the`run()` function below to apply +// these settings to the job's execution. +jobconfig = new JobConfig() +jobconfig.post_test_summary = true + +// Define each build configuration, copying and overriding values as necessary. +bc0 = new BuildConfig() +bc0.nodetype = "linux-stable" +bc0.name = "libtest" +bc0.build_cmds = ["true"] +bc0.test_cmds = ["conda install -q -y pytest requests astropy", + "pytest tests --basetemp=tests_output --junitxml results.xml --remote-data tests/"] +bc0.failedUnstableThresh = 1 +bc0.failedFailureThresh = 6 + + +// Iterate over configurations that define the (distibuted) build matrix. +// Spawn a host of the given nodetype for each combination and run in parallel. +// Also apply the job configuration defined in `jobconfig` above. +utils.run([bc0, jobconfig]) |