Skip to content

QA-273: Feature/python test runner #401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 140 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from 122 commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
a971830
start implementing a python launch controller
dothebart Jul 4, 2022
0226c4e
make it work for the first time
dothebart Jul 5, 2022
1c311e5
try launching outside of oskar.
dothebart Aug 2, 2022
c9b3760
no more pipes needed
dothebart Jul 5, 2022
f7abec9
adjust report directory
dothebart Jul 6, 2022
f797024
fix paths, thread naming.
dothebart Jul 6, 2022
9ffa927
fallback if no env is configured
dothebart Jul 6, 2022
cb3d867
lint
dothebart Jul 6, 2022
02f086e
more work on cluster etc
dothebart Jul 6, 2022
fdccda0
silence, proper error message for missing variable
dothebart Jul 6, 2022
6ac8ab6
convert params
dothebart Jul 6, 2022
30be55e
lint
dothebart Jul 6, 2022
14c5b9a
fix slot
dothebart Jul 7, 2022
e7f4cd0
fix arangosh.conf, launching of subsequent testruns
dothebart Jul 7, 2022
cb69dd3
try to launch it from fish
dothebart Jul 7, 2022
eae8168
implement 7zip
dothebart Jul 7, 2022
b5d651e
add modules to the docker container
dothebart Jul 7, 2022
3c7825a
more printing
dothebart Jul 7, 2022
8383c4c
fix handling
dothebart Jul 7, 2022
2eb57a8
Add pip3
KVS85 Jul 7, 2022
295c7e0
Fix typo
KVS85 Jul 7, 2022
70fa195
Typo 2
KVS85 Jul 7, 2022
7d22e6f
handle INNERWORKDIR
dothebart Jul 7, 2022
e4fa44f
fix missing line break
dothebart Jul 7, 2022
6e91089
export settings
dothebart Jul 8, 2022
bd19986
fix typo
dothebart Jul 8, 2022
0a423ee
on windows skip !windows tests
dothebart Jul 8, 2022
fdfa129
lint, refactor, simplify
dothebart Jul 8, 2022
ba6d7a5
install 7z
dothebart Jul 8, 2022
8e2a71d
export core directory
dothebart Jul 11, 2022
bb55fde
work on fish integration
dothebart Jul 11, 2022
4003587
similarize for new python job scheduler
dothebart Jul 11, 2022
6915769
work on reprot generating
dothebart Jul 12, 2022
78ecbfd
try to implement timeout
dothebart Jul 12, 2022
22f9f51
also upload 7z and txt
dothebart Jul 12, 2022
5cd66d6
also upload 7z and txt
dothebart Jul 12, 2022
d6508d9
fix deadline
dothebart Jul 12, 2022
6f0b17e
fix workspace handling
dothebart Jul 12, 2022
4e4e8b2
fix temporary directory handling
dothebart Jul 12, 2022
6018f9a
make sure out temp directory exists
dothebart Jul 12, 2022
0d899f5
RTFM fail
dothebart Jul 12, 2022
9823716
don't put it to the workspace
dothebart Jul 13, 2022
156d767
implement gtest invoking
dothebart Jul 13, 2022
7562862
cleanup
dothebart Jul 13, 2022
3acedf9
sort, lint
dothebart Jul 13, 2022
4ed0cf1
prefer INNERWORKDIR
dothebart Jul 13, 2022
a584056
implement writing test.log
dothebart Jul 13, 2022
51fe696
implement html report
dothebart Jul 13, 2022
067e52f
bring back function deletet to early
dothebart Aug 2, 2022
80c9e54
install the windows boomerang handler on top level
dothebart Jul 14, 2022
f5edab9
fix include
dothebart Jul 14, 2022
9bb5fd0
fix reference
dothebart Jul 14, 2022
158268f
print before killing shit
dothebart Jul 14, 2022
9d9da8a
work on timeout
dothebart Jul 15, 2022
33324a1
finish deadline handling, rename script
dothebart Jul 18, 2022
d9b1cba
fix exit code handling
dothebart Jul 18, 2022
7c0e238
lint
dothebart Jul 18, 2022
fedca4d
thanks @mpoeter for ps aid
dothebart Jul 19, 2022
e601103
make the thread identifier the test plus a growing number
dothebart Jul 19, 2022
6774b4a
implement central final deadline, which will kick in after 2 minutes
dothebart Jul 19, 2022
e050e41
remove debug output
dothebart Jul 19, 2022
6ecf3ac
use /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bi…
dothebart Jul 19, 2022
dbc55db
wintendo next try
dothebart Jul 19, 2022
37e7fe9
wintendo next try
dothebart Jul 19, 2022
d02e3f4
wintendo go home
dothebart Jul 19, 2022
9f316b3
fix calculation of hard time limit
dothebart Jul 19, 2022
2c31934
make sure nobody changes the exit code to good
dothebart Jul 19, 2022
510f52c
add monkey patches
dothebart Jul 19, 2022
299a8ad
cleanup deadline
dothebart Jul 20, 2022
192967f
ignore exceptions if no process is there
dothebart Jul 20, 2022
9dc94b2
deadline handling: prioritize incomming lines over timeout counting
dothebart Jul 20, 2022
8fa4ea2
fix directory handling
dothebart Jul 20, 2022
e6368d7
work on result presentation
dothebart Jul 21, 2022
f74ce49
cleanup
dothebart Jul 21, 2022
b2bdab6
let the file remain open for further info
dothebart Jul 21, 2022
fa89e39
fix environment variable handling
dothebart Jul 21, 2022
f8b65fa
documentation
dothebart Jul 21, 2022
f1921fd
fix port handling
dothebart Jul 21, 2022
ae07a8b
work on deadline
dothebart Jul 21, 2022
b7a29ed
fix hard deadline handling
dothebart Jul 21, 2022
6cd94a0
make it 20s
dothebart Jul 21, 2022
00144a4
need more time
dothebart Jul 21, 2022
8510dbc
list processes so we may guess whats actually going on
dothebart Jul 21, 2022
122f15c
kill all, then waitpid all
dothebart Jul 22, 2022
441ab0e
make threads provide half a slot.
dothebart Jul 22, 2022
79652af
be sure to catch
dothebart Jul 22, 2022
3f4a473
resume just in case, then kill
dothebart Jul 22, 2022
d500a89
resume just in case, then kill
dothebart Jul 22, 2022
b3f2346
ignore resume errors
dothebart Jul 25, 2022
1472a13
increase volume
dothebart Jul 25, 2022
586da13
lint
dothebart Jul 25, 2022
6dbdb4a
lint
dothebart Jul 25, 2022
b72cb41
catch more
dothebart Jul 25, 2022
79d29fc
add multipliers
dothebart Jul 26, 2022
e762bdd
more load, print load avg
dothebart Jul 27, 2022
350e481
fix sorting by prio - biggest values first
dothebart Jul 27, 2022
0617478
cleanup crash report for size
dothebart Jul 27, 2022
1ff13b7
if test indicates its been crashing create report as well.
dothebart Jul 27, 2022
b10e155
more threat to the machine.
dothebart Jul 27, 2022
f096bc9
timeout
dothebart Jul 27, 2022
12eff18
fix typo
dothebart Jul 27, 2022
66f6c69
delete tzdata subdir first
dothebart Jul 28, 2022
434ee8f
use load and sockets for throttle control
dothebart Jul 28, 2022
2154a58
install required python libs
dothebart Jul 28, 2022
f7afa24
only see for load [0, 1]
dothebart Jul 28, 2022
c9235a2
increase container version
dothebart Jul 28, 2022
ea4bb9d
anounce deadline at start
dothebart Jul 28, 2022
8c851db
don't print to logfile
dothebart Jul 29, 2022
52d7ac7
give better feedback if arangosh fails to launch in first place, than…
dothebart Jul 29, 2022
a9938a7
Update helper.linux.fish
KVS85 Aug 2, 2022
ac06090
tschuess ruby
dothebart Aug 2, 2022
c6b7b97
Merge branch 'master' into feature/python_test_runner
dothebart Aug 10, 2022
052df56
Merge branch 'master' of github.com:arangodb/oskar into feature/pytho…
dothebart Aug 12, 2022
b660d08
re-sync to be stock RTA
dothebart Aug 12, 2022
f47b0ba
fix container numbers, adjust #3
dothebart Aug 12, 2022
0cba0b0
sync to rta
dothebart Aug 12, 2022
e3f52a9
resync
dothebart Aug 15, 2022
9ce6a70
this is not needed anymore
dothebart Aug 15, 2022
e4d3303
add --fix-missing
dothebart Aug 15, 2022
1a2a812
fresh python?
dothebart Aug 15, 2022
3acc581
revert to tar.gz
dothebart Aug 15, 2022
2f70af6
chaos tests in nightlies demand for longer timeouts, since tests run …
dothebart Aug 15, 2022
a09554d
Update README.md
dothebart Aug 15, 2022
5b68416
Update README.md
dothebart Aug 15, 2022
9a5beea
Update README.md
dothebart Aug 15, 2022
b7fb017
Update README.md
dothebart Aug 15, 2022
1a9c364
Update README.md
dothebart Aug 15, 2022
70d1842
remove more old stuff
dothebart Aug 15, 2022
46f058d
Merge branch 'feature/python_test_runner' of github.com:arangodb/oska…
dothebart Aug 15, 2022
2a718d8
ignore encoding errors
dothebart Aug 16, 2022
1af8187
increase timeout to hard self kill
dothebart Aug 16, 2022
50055d4
switch to one environment variable name
dothebart Aug 17, 2022
1363b8d
env
dothebart Aug 17, 2022
69b7a0e
limit the amount of coredumps
dothebart Aug 22, 2022
7b9b50c
ignore access denied to open sockets
dothebart Aug 22, 2022
0baa8b2
if we need to wait for the system to cool down on start...
dothebart Aug 22, 2022
f8841fe
make sure we don't come back good if nothing launched at all
dothebart Aug 22, 2022
d809254
them tiny boxes need more time
dothebart Aug 22, 2022
ba8d770
need more time
dothebart Aug 23, 2022
54ffe77
add deadline status to testfailurs.txt
dothebart Aug 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,100 @@ if supported, set number of concurrent builds to `PARALLELISM`

## Testing

`jenkins/helper/test_launch_controller.py` is used to control multiple test executions.

### Its dependencies over stock python3 are:
- psutil to controll subprocesses
- py7zr (optional) to build 7z reports instead of tar.bz2

### Its reading these environment variables:
- `INNERWORKDIR` - as the directory to place the report files
- `WORKDIR` - used instead if `INNERWORKDIR` hasn't been set.
- `TEMP` - temporary directory if not `INNERWORKDIR`/ArangoDB
- `TMPDIR` and `TEMP` are passed to the executors.
- `TSHARK` passed as value to `--sniffProgram`
- `DUMPDEVICE` passed as value to `--sniffDevice`
- `SKIPNONDETERMINISTIC` passed on as value to `--skipNondeterministic` to the testing.
- `SKIPTIMECRITICAL` passed on as value to `--skipTimeCritical` to the testing.
- `BUILDMODE` passed on as value to `--buildType` to the testing.
- `DUMPAGENCYONERROR` passed on as value to `--dumpAgencyOnError` to the testing.
- `PORTBASE` passed on as value to `--minPort` and `--maxPort` (+99) to the testing. Defaults to 7000
- `SKIPGREY` passed on as value to `--skipGrey` to the testing.
- `ONLYGREY` passed on as value to `--onlyGrey` to the testing.
- `TIMELIMIT` is used to calculate the execution deadline starting point in time.
- `COREDIR` the directory to locate coredumps for crashes
- `LDAPHOST` to enable the tests with `ldap` flags.
- any parameter in `test-definition.txt` that starts with a `$` is expanded to its value.

### Its Parameters are:
- `PATH/test-definition.txt` - (first parameter) test definitions file from the arangodb source tree
(also used to locate the arangodb source)
- `-f` `[launch|dump]` use `dump` for syntax checking of `test-definition.txt` instead of executing the tests
- `--validate-only` don't run the tests
- `--help-flags` list the flags which can be used in `test-definition.txt`:
- `cluster`: this test requires a cluster
- `single`: this test requires a single server
- `full`: this test is only executed in full tests
- `!full`: this test is only executed in non-full tests
- `gtest`: only the gtest are to be executed
- `ldap`: ldap
- `enterprise`: this tests is only executed with the enterprise version
- `!windows`: test is excluded from ps1 output
- `--cluster` filter `test-definition.txt` for all tests flagged as `cluster`
- `--full` - all tests including those flagged as `full` are executed.
- `--gtest` - only gtest are executed
- `--all` - output unfiltered

### Syntax in `test-definition.txt`
Lines consist of these parts:
```
testingJsSuiteName flags params suffix -- args to testing.js
```
where
- `flags` are listed above in `--help-flags`
- params are:
- weight - sequence priority of test, 250 is the default.
- wweight - execution slots to book. defaults to 1, if cluster 4.
- buckets - split testcases to be launched in concurent chunks
Specifying a `*` in front of the number takes the default and multiplies it by the value.
- suffix - if a testsuite is launched several times, make it distinguishable
like shell_aql => shell_aql_vst ; Bucket indexes are appended afterwards.
- `--` literally the two dashes to split the line at.
- `args to testing.js` - anything that `./scripts/unittest --help` would print you.

### job scheduling
To utilize all of the machines resources, tests can be run in parallel. The `execution_slots` are
set to the number of the physical cores of the machine (not threads).
`wweight` is used to add the currently expected load by the tests to be no more than `execution_slots`.

For managing each of these parallel executions of testing.js, worker threads are used. The workers
themselves will spawn a set of I/O threads to capture the output of testing.js into a report file.

The life cycle of a testrun will be as follows:

- the environment variable `TESTSUITE_TIMEOUT` defines a *deadline* to all the tests, how much seconds should be allowed.
- tests are running in worker threads.
- main thread keeps control, launches more worker threads, once machine bandwith permits, but only every 5s as closest to not overwhelm the machine while launching arangods.
- tests themselves have their timeouts; `testing.js` will abort if they are reached.
- workers have a progressive timeout, if it doesn't hear back from `testing.js` for 999999999s it will hard kill and abort. [currently high / not used!]
- if workers have no output from `testing.js` they check whether the *deadline* is reached.
- if the *deadline* is reached, `SIG_INT`[* nix] / `SIG_BREAK`[windows] is sent to `testing.js` to trigger its *deadline* feature.
- the reached *deadline* will be indicated to the `testfailures.txt` report file and the logfile of the test in question.
- with *deadline* engageged, `testing.js` can send no more subsequent requests, nor spawn processes => eventually testing will abort.
- force shutdown of arangod Instances will reset the deadline, SIG_ABRT arangods, and try to do core dump analysis.
- workers continue reading pipes from `testing.js`, but once no chars are comming, `waitpid()` checks with a 1s timout whether `testing.js` is done and exited.
- if the worker reaches `180` counters of `waitpid()` invocations it will give up. It will hard kill `testing.js` and all other child processes it can find.
- this should unblock the workers I/O threads, and they should exit.
- the `waitpid()` on `testing.js` should exit, I/O threads should be joined, results should be passed up to the main thread.
- so the workers still have a slugish interpretation of the *deadline*, giving them the chance to collect as much knowledge about the test execution as posible.
- meanwhile the main thread has a *fixed* deadline: 5 minutes after the `TESTSUITE_TIMEOUT` is reached.
- if not all workers have indicated their exit before this final deadline:
- the main thread will start killing any subprocesses of itself which it finds.
- after this wait another 20s, to see whether the workers may have been unblocked by the killing
- if not, it shouts "Geronimoooo" and takes the big shotgun, and force-terminates the python process which is running it. This will kill all threads as well and terminate the process.
- if all workers have indicated their exit in time, their threads will be joined.
- reports will be generated.

## Packaging

makeRelease
Expand Down
8 changes: 4 additions & 4 deletions containers/buildUbuntu3.docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ ENV COMPILER_VERSION 9

ENV CLANG_VERSION 12

RUN apt-get update && \
RUN apt-get update --fix-missing && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt-get update && \
apt-get upgrade -y

RUN apt-get install -y build-essential gcc-${COMPILER_VERSION} g++-${COMPILER_VERSION} cmake make bison flex python python3-distutils ccache git libjemalloc-dev vim exuberant-ctags gdb fish ruby ruby-httparty ruby-rspec psmisc sudo debhelper debconf jq wget libdb-dev curl gnupg2 gcovr prometheus && gem install persistent_httparty && apt-get clean
apt-get upgrade -y && \
apt-get install -y build-essential gcc-${COMPILER_VERSION} g++-${COMPILER_VERSION} cmake make bison flex python3-psutil python3-distutils ccache git libjemalloc-dev vim exuberant-ctags gdb fish psmisc sudo debhelper debconf jq wget libdb-dev curl gnupg2 gcovr prometheus &&\
apt-get clean

RUN curl -L https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-${ARCH}-unknown-linux-musl.tar.gz | tar xvz -C /tmp && mv /tmp/sccache-v0.2.15-${ARCH}-unknown-linux-musl/sccache /usr/bin/sccache && chmod +x /usr/bin/sccache && rm -rf /tmp/sccache-v0.2.15-${ARCH}-unknown-linux-musl

Expand Down
7 changes: 5 additions & 2 deletions containers/buildUbuntu4.docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

FROM ubuntu:20.04
MAINTAINER Max Neunhoeffer <[email protected]>

Expand All @@ -7,12 +8,12 @@ ENV COMPILER_VERSION 9

ENV CLANG_VERSION 12

RUN apt-get update && \
RUN apt-get update --fix-missing && \
apt-get install -y software-properties-common && \
apt-get update && \
apt-get upgrade -y

RUN apt-get install -y build-essential gcc-${COMPILER_VERSION} g++-${COMPILER_VERSION} cmake make bison flex python ccache git libjemalloc-dev vim exuberant-ctags gdb fish ruby ruby-httparty ruby-rspec psmisc sudo debhelper debconf jq wget libdb-dev curl gnupg2 gcovr prometheus && gem install persistent_httparty && apt-get clean
RUN apt-get install -y build-essential gcc-${COMPILER_VERSION} g++-${COMPILER_VERSION} cmake make bison flex python ccache git libjemalloc-dev vim exuberant-ctags gdb fish psmisc sudo debhelper debconf jq wget libdb-dev curl gnupg2 gcovr prometheus && apt-get clean

RUN curl -L https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-${ARCH}-unknown-linux-musl.tar.gz | tar xvz -C /tmp && mv /tmp/sccache-v0.2.15-${ARCH}-unknown-linux-musl/sccache /usr/bin/sccache && chmod +x /usr/bin/sccache && rm -rf /tmp/sccache-v0.2.15-${ARCH}-unknown-linux-musl

Expand All @@ -32,4 +33,6 @@ RUN git config --global --add safe.directory /work/ArangoDB
RUN git config --global --add safe.directory /work/ArangoDB/enterprise
RUN git config --global --add safe.directory /work/ArangoDB/docs

RUN apt-get install -y python3-pip && pip3 install py7zr psutil

CMD [ "/usr/bin/fish" ]
6 changes: 4 additions & 2 deletions containers/buildUbuntu5.docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ ENV COMPILER_VERSION 10

ENV CLANG_VERSION 12

RUN apt-get update && \
RUN apt-get update --fix-missing && \
apt-get install -y software-properties-common && \
apt-get update && \
apt-get upgrade -y

RUN apt-get install -y build-essential gcc-${COMPILER_VERSION} g++-${COMPILER_VERSION} cmake make bison flex python ccache git libjemalloc-dev vim exuberant-ctags gdb fish ruby ruby-httparty ruby-rspec psmisc sudo debhelper debconf jq wget libdb-dev curl gnupg2 gcovr prometheus && gem install persistent_httparty && apt-get clean
RUN apt-get install -y build-essential gcc-${COMPILER_VERSION} g++-${COMPILER_VERSION} cmake make bison flex python ccache git libjemalloc-dev vim exuberant-ctags gdb fish psmisc sudo debhelper debconf jq wget libdb-dev curl gnupg2 gcovr prometheus && apt-get clean

RUN curl -L https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-${ARCH}-unknown-linux-musl.tar.gz | tar xvz -C /tmp && mv /tmp/sccache-v0.2.15-${ARCH}-unknown-linux-musl/sccache /usr/bin/sccache && chmod +x /usr/bin/sccache && rm -rf /tmp/sccache-v0.2.15-${ARCH}-unknown-linux-musl

Expand All @@ -37,4 +37,6 @@ RUN git config --global --add safe.directory /work/ArangoDB/3rdParty/iresearch
RUN git config --global --add safe.directory /work/ArangoDB/3rdParty/rocksdb
RUN git config --global --add safe.directory /work/ArangoDB/3rdParty/velocypack

RUN apt-get install -y python3-pip && pip3 install py7zr psutil

CMD [ "/usr/bin/fish" ]
4 changes: 3 additions & 1 deletion containers/buildUbuntu6.docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENV COMPILER_VERSION 11

ENV CLANG_VERSION 14

RUN apt-get update && \
RUN apt-get update --fix-missing && \
apt-get install -y software-properties-common && \
apt-get update && \
apt-get upgrade -y
Expand Down Expand Up @@ -39,4 +39,6 @@ RUN git config --global --add safe.directory /work/ArangoDB/3rdParty/iresearch
RUN git config --global --add safe.directory /work/ArangoDB/3rdParty/rocksdb
RUN git config --global --add safe.directory /work/ArangoDB/3rdParty/velocypack

RUN apt-get install -y python3-pip && pip3 install py7zr psutil

CMD [ "/usr/bin/fish" ]
7 changes: 4 additions & 3 deletions helper.fish
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ end
function single ; set -gx TESTSUITE single ; end
function cluster ; set -gx TESTSUITE cluster ; end
function resilience ; set -gx TESTSUITE resilience ; end
function catchtest ; set -gx TESTSUITE catchtest ; end
function catchtest ; set -gx TESTSUITE gtest ; end
function gtest ; set -gx TESTSUITE gtest ; end
if test -z "$TESTSUITE" ; cluster
else ; set -gx TESTSUITE $TESTSUITE ; end

Expand Down Expand Up @@ -1484,7 +1485,7 @@ function showConfig
printf $fmt3 'SkipGrey' $SKIPGREY '(skipGrey/includeGrey)'
printf $fmt3 'OnlyGrey' $ONLYGREY '(onlyGreyOn/onlyGreyOff)'
printf $fmt3 'Storage engine' $STORAGEENGINE '(mmfiles/rocksdb)'
printf $fmt3 'Test suite' $TESTSUITE '(single/cluster/resilience/catchtest)'
printf $fmt3 'Test suite' $TESTSUITE '(single/cluster/resilience/gtest)'
printf $fmt2 'Log Levels' (echo $LOG_LEVELS)
echo
echo 'Package Configuration'
Expand Down Expand Up @@ -1943,7 +1944,7 @@ function moveResultsToWorkspace
mv $WORKDIR/work/coverage $WORKSPACE
end

set -l matches $WORKDIR/work/*.{asc,deb,dmg,rpm,tar.gz,tar.bz2,zip,html,csv}
set -l matches $WORKDIR/work/*.{asc,testfailures.txt,deb,dmg,rpm,7z,tar.gz,tar.bz2,zip,html,csv}
for f in $matches
echo $f | grep -qv testreport ; and echo "mv $f" ; and mv $f $WORKSPACE; or echo "skipping $f"
end
Expand Down
12 changes: 6 additions & 6 deletions helper.linux.fish
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ set -gx ARCH (uname -m)
set IMAGE_ARGS "--build-arg ARCH=$ARCH"

set -gx UBUNTUBUILDIMAGE3_NAME arangodb/ubuntubuildarangodb3-$ARCH
set -gx UBUNTUBUILDIMAGE3_TAG 16
set -gx UBUNTUBUILDIMAGE3_TAG 17
set -gx UBUNTUBUILDIMAGE3 $UBUNTUBUILDIMAGE3_NAME:$UBUNTUBUILDIMAGE3_TAG

set -gx UBUNTUBUILDIMAGE4_NAME arangodb/ubuntubuildarangodb4-$ARCH
set -gx UBUNTUBUILDIMAGE4_TAG 17
set -gx UBUNTUBUILDIMAGE4_TAG 18
set -gx UBUNTUBUILDIMAGE4 $UBUNTUBUILDIMAGE4_NAME:$UBUNTUBUILDIMAGE4_TAG

set -gx UBUNTUBUILDIMAGE5_NAME arangodb/ubuntubuildarangodb5-$ARCH
set -gx UBUNTUBUILDIMAGE5_TAG 10
set -gx UBUNTUBUILDIMAGE5_TAG 11
set -gx UBUNTUBUILDIMAGE5 $UBUNTUBUILDIMAGE5_NAME:$UBUNTUBUILDIMAGE5_TAG

set -gx UBUNTUBUILDIMAGE6_NAME arangodb/ubuntubuildarangodb6-$ARCH
set -gx UBUNTUBUILDIMAGE6_TAG 2
set -gx UBUNTUBUILDIMAGE6_TAG 3
set -gx UBUNTUBUILDIMAGE6 $UBUNTUBUILDIMAGE6_NAME:$UBUNTUBUILDIMAGE6_TAG

set -gx UBUNTUPACKAGINGIMAGE arangodb/ubuntupackagearangodb-$ARCH:1
Expand Down Expand Up @@ -454,11 +454,11 @@ function oskar
and if test "$SAN" = "On"
parallelism 2
clearSanStatus
runInContainer --cap-add SYS_NICE --cap-add SYS_PTRACE (findBuildImage) $SCRIPTSDIR/runTests.fish $argv
runInContainer --security-opt seccomp=unconfined --cap-add SYS_NICE --cap-add SYS_PTRACE (findBuildImage) $SCRIPTSDIR/runTests.fish $argv
set s $status
set s (math $s + (getSanStatus))
else
runInContainer --cap-add SYS_NICE (findBuildImage) $SCRIPTSDIR/runTests.fish $argv
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the moment this is required so we may spawn threads for containers in later ubuntus.

runInContainer --security-opt seccomp=unconfined --cap-add SYS_NICE (findBuildImage) $SCRIPTSDIR/runTests.fish $argv
set s $status
end

Expand Down
8 changes: 7 additions & 1 deletion helper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Else
$global:TSHARK = ""
}
}
$ENV:TSHARK=$global:TSHARK

$global:HANDLE_EXE = $null
If (Get-Command handle.exe -ErrorAction SilentlyContinue)
Expand All @@ -65,7 +66,7 @@ Else
{
Remove-Item "$global:COREDIR\*" -Recurse -Force
}
$global:RUBY = (Get-Command ruby.exe).Path
$env:COREDIR=$global:COREDIR
$global:INNERWORKDIR = "$WORKDIR\work"
$global:ARANGODIR = "$INNERWORKDIR\ArangoDB"
$global:ENTERPRISEDIR = "$global:ARANGODIR\enterprise"
Expand Down Expand Up @@ -582,6 +583,11 @@ Function showConfig
Write-Host "------------------------------------------------------------------------------"
Write-Host "Cache Statistics"
showCacheStats
$ENV:SKIPNONDETERMINISTIC = $SKIPNONDETERMINISTIC
$ENV:SKIPTIMECRITICAL = $SKIPTIMECRITICAL
$ENV:SKIPGREY = $SKIPGREY
$ENV:ONLYGREY = $ONLYGREY
$ENV:BUILDMODE = $BUILDMODE
comm
}

Expand Down
2 changes: 2 additions & 0 deletions jenkins/helper/allure_commons/_allure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def attach(**kwargs):
return
79 changes: 79 additions & 0 deletions jenkins/helper/asciiprint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!env python
""" removes terminal control sequences and other non ascii characters """
import unicodedata
import re
import sys

is_tty = sys.stdout.isatty()
PROGRESS_COUNT = 0

# 7-bit C1 ANSI sequences
ANSI_ESCAPE_B = re.compile(
rb"""
\x1B # ESC
\xE2 # throbber...
\xA0 # throbber...
\xA7 # throbber...
\x8F # throbber...
\r # cariage return
(?: # 7-bit C1 Fe (except CSI)
[@-Z\\-_]
| # or [ for CSI, followed by a control sequence
\[
[0-?]* # Parameter bytes
[ -/]* # Intermediate bytes
[@-~] # Final byte
)
""",
re.VERBOSE,
)


def ascii_convert(the_bytes: bytes):
"""convert string to only be ascii without control sequences"""
return ANSI_ESCAPE_B.sub(rb"", the_bytes).decode("utf-8")


# 7-bit C1 ANSI sequences
ANSI_ESCAPE = re.compile(
r"""
\x1B # ESC
\xE2 # throbber...
\xA0 # throbber...
\xA7 # throbber...
\x8F # throbber...
\r # cariage return
(?: # 7-bit C1 Fe (except CSI)
[@-Z\\-_]
| # or [ for CSI, followed by a control sequence
\[
[0-?]* # Parameter bytes
[ -/]* # Intermediate bytes
[@-~] # Final byte
)
""",
re.VERBOSE,
)


def ascii_convert_str(the_str: str):
"""convert string to only be ascii without control sequences"""
return ANSI_ESCAPE.sub(rb"", the_str)


def ascii_print(string):
"""convert string to only be ascii without control sequences"""
string = ANSI_ESCAPE.sub("", string)
print("".join(ch for ch in string if ch == "\n" or unicodedata.category(ch)[0] != "C"))


def print_progress(char):
"""print a throbber alike that immediately is sent to the console"""
# pylint: disable=global-statement
global PROGRESS_COUNT
print(char, end="")
PROGRESS_COUNT += 1
if not is_tty and PROGRESS_COUNT % 10 == 0:
# add a linebreak so we see something in jenkins (if):
print("\n")
sys.stdout.flush()
Loading