-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmc-run
executable file
·47 lines (38 loc) · 1.41 KB
/
tmc-run
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash -e
# This tmc-run is not used, the actual tmc-run is copied from the sandbox image in /app/init
# This gets run under 'su', so we want to source profile mostly to get any special PATH.
# Sourcing seems to terminate the script with -e, even when the return status is 0.
# I have absolutely no idea why. We work around it with the '|| true'.
#. /etc/profile || true
# Source user params if any.
# Though the variable names and content format here are limited,
# the contents should be treated carefully, despite us being in a sandbox.
#
# Included variables: error_msg_locale
#
if [ -r .tmcparams ]; then
. ./.tmcparams
fi
echo "User id: $(id)"
if [ -z "$error_msg_locale" ]; then
echo "Setting error_msg_locale"
error_msg_locale=en
fi
# Source .tmcrc if any
if [ -f .tmcrc ]; then
echo "Including .tmcrc"
. ./.tmcrc
fi
if [ -e /tmc-langs-cli ]; then
echo "Copying tmc-langs-cli from the image"
cp /tmc-langs-cli tmc-langs-cli
fi
echo "Running tests..."
export RUST_LOG=debug
export TMC_SANDBOX=true
export MAVEN_OPTS="-Dtestfx.robot=glass -Dtestfx.headless=true -Dprism.order=sw -Dprism.text=t2k -Djava.awt.headless=true"
./tmc-langs-cli run-tests --exercise-path . --output-path /app/test_output.txt --checkstyle-output-path /app/validations.json --locale $error_msg_locale > >(tee -a stdout.log) 2> >(tee -a stderr.log >&2) || exit 110
echo "All the files:"
ls -laR
echo "tmc-run completed successfully"
exit 0