-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathoafTest.sh
More file actions
executable file
·38 lines (33 loc) · 904 Bytes
/
oafTest.sh
File metadata and controls
executable file
·38 lines (33 loc) · 904 Bytes
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
#!/bin/sh
# --------------------------------------
echo "Starting OpenAF test execution..."
# -------------------------
echo "Installing OpenAF..."
rm -rf _oaf
mkdir -p _oaf
cp openaf.jar _oaf
cd _oaf
java -jar openaf.jar --install
if [ -f ojob ]; then
echo "OpenAF installed successfully."
else
echo "OpenAF installation failed, exiting."
exit 1
fi
# ----------------------------
echo "Running OpenAF tests..."
cd ..
cd tests
../_oaf/ojob autoTestAll.yaml
# If autoTestAll.results.json exist execute oaf
if [ -f autoTestAll.results.json ]; then
../_oaf/oaf -c "_r=io.readFileJSON('autoTestAll.results.json');if (_r.fail>0) exit(1); else exit(0)"
if [ $? -ne 0 ]; then
echo "Test execution failed, exiting with error."
exit 1
else
echo "Test executed successfully."
fi
else
echo "autoTestAll.results.json not found, skipping oaf execution."
fi