blob: 0160e5b799906abd655db26ae47c9c85dede6ade (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# This script modifies `WarpX-test.ini` (which is used for nightly builds)
# and creates the file `shippable-test.ini` (which is used for continous
# integration on Shippable (https://app.shippable.com/))
import re
with open('WarpX-tests.ini') as f:
text = f.read()
# Add doComparison = 0 for each test
text = re.sub( '\[(?P<name>.*)\]\nbuildDir = ',
'[\g<name>]\ndoComparison = 0\nbuildDir = ', text )
# Use only 2 cores for compiling
text = re.sub( 'numMakeJobs = \d+', 'numMakeJobs = 2', text )
# Remove Python test (does not compile in the Docker container)
text = re.sub( '\[Python_Langmuir\]\n(.+\n)*', '', text)
# Remove Langmuir_x/y/z test (too long; not that useful)
text = re.sub( '\[Langmuir_[xyz]\]\n(.+\n)*', '', text)
# Skip unit tests (too long; not that useful)
text = re.sub( '\[UnitTest_[a-zA-Z]+\]\n(.+\n)*', '', text)
# Prevent emails from being sent
text = re.sub( 'sendEmailWhenFail = 1', 'sendEmailWhenFail = 0', text )
with open('shippable-tests.ini', 'w') as f:
f.write(text)
|