Skip to content

Commit

Permalink
TST+BLD Add gitlab target for long jobs (max 24h)
Browse files Browse the repository at this point in the history
Adjustments were done to run-tests.sh to allow selecting subsets of
tests based on a prefix. e.g. run-tests.sh regression
  • Loading branch information
unode committed Mar 1, 2020
1 parent 59576e0 commit 48b96a2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,35 @@ build-and-test-ubuntu-wsl-profiling:
- Modules/packages/
expire_in: 1 month

build-and-longtests-ubuntu-wsl:
image: registry.gitlab.com/ngless/ngless/ubuntu-ghc-stack:wsl
stage: build
tags: longjob

before_script:
- apt update
- apt upgrade -y
- stack upgrade
- mkdir bin

variables:
LC_ALL: "C.UTF-8"
STACKOPTS: "--system-ghc --ghc-options '-fPIC' --flag NGLess:embed"
retry: 1

script:
- make modules
- make check
- make install prefix=${PWD}
- PATH=${PWD}/bin:$PATH ./run-tests.sh long-

# Allow this to fail without failing the entire commit
#allow_failure: true
# Don't run this step automatically, make it a manually triggered build
when: manual
# The profiling build takes considerably longer, so relax the project's 2 hour limit
timeout: 24 hours

build-and-test-ubuntu-non-static:
image: registry.gitlab.com/ngless/ngless/ubuntu-ghc-stack:old
stage: build
Expand Down
7 changes: 7 additions & 0 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ if ! ngless --check-install ; then
exit 1
fi

TEST_PREFIX="$1"

echo ">>> Running tests with: $(ngless --version-debug) <<<"

ok="yes"
failed_tests=""
for testdir in tests/*; do
if test -d "$testdir"; then
# Run only tests with specified PREFIX
# Useful to run only 'long-' tests or 'regression'
if [[ "x$TEST_PREFIX" != "x" ]] && [[ "$testdir" != tests/${TEST_PREFIX}-* ]]; then
continue
fi
cur_ok=yes
if test -f "${testdir}/TRAVIS_SKIP" -a "x$TRAVIS" = xtrue; then
echo "Skipping $testdir on Travis"
Expand Down

0 comments on commit 48b96a2

Please sign in to comment.