-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·63 lines (53 loc) · 1.38 KB
/
test.sh
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
shopt -s extglob
# This tests the core PFA functionalities IN FUNCTIONAL SIMULATION ONLY. This does
# not test actual firesim behavior.
pushd ../../
if [ ! -e marshal ]; then
echo "Can't find marshal command. This test assume's it's run from firesim-software/workloads/pfa-exp."
exit 1
fi
if [ ! -e workloads/pfa-bare-test.json ]; then
echo "Please run ./install.sh first"
exit 1
fi
SUITE_PASS=true
# Actual tests begin
echo "Running Qemu-only Tests"
QEMU_TESTS="@(pfa-br-test-em-pfa|pfa-br-test-em-mb|pfa-br-test-kpfad-em-pfa)"
./marshal clean workloads/$QEMU_TESTS.json
./marshal test workloads/$QEMU_TESTS.json
if [ ${PIPESTATUS[0]} != 0 ]; then
echo "Failure"
SUITE_PASS=false
else
echo "Success"
fi
echo "Running bare-metal Tests"
BARE_TESTS="@(pfa-bare-test)"
./marshal clean workloads/$BARE_TESTS.json
./marshal test -s workloads/$BARE_TESTS.json
if [ ${PIPESTATUS[0]} != 0 ]; then
echo "Failure"
SUITE_PASS=false
else
echo "Success"
fi
echo "Running Spike-only Tests"
SPIKE_TESTS="@(pfa-br-test-real-pfa|pfa-br-test-kpfad-real-pfa)"
./marshal -i clean workloads/$SPIKE_TESTS.json
./marshal -i test -s workloads/$SPIKE_TESTS.json
if [ ${PIPESTATUS[0]} != 0 ]; then
echo "Failure"
SUITE_PASS=false
else
echo "Success"
fi
popd
if [ $SUITE_PASS = false ]; then
echo "FAILURE: Some tests failed"
exit 1
else
echo "SUCCESS: Full test success"
exit 0
fi