aboutsummaryrefslogtreecommitdiffstats
path: root/tests/files/ansible/test-files/testrunner.sh
blob: 5d7779109cf2dd01bc33cc981aa4e8308bcd1d08 (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
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
#!/bin/bash

# create random virtual machine test
#cd ~/software/Ethereum/pyethereum (python has local dependencies so only works from within the directory)
cd ~
while [ 1 ]
do  
    TEST="$(docker run --rm --entrypoint="/cpp-ethereum/build/test/createRandomTest" cppjit)"
    # echo "$TEST"
    
    # test pyethereum
    #OUTPUT_PYTHON="$(python ./tests/test_vm.py "$TEST")"
    #RESULT_PYTHON=$?

    # test go
    OUTPUT_GO="$(docker run --rm go "$TEST")"
    RESULT_GO=$?
    
    # test cpp-jit
    OUTPUT_CPPJIT="$(docker run --rm cppjit "$TEST")"
    RESULT_CPPJIT=$?

    # go fails
    if [ "$RESULT_GO" -ne 0 ]; then
        echo Failed:
        echo Output_GO:
        echo $OUTPUT_GO
        echo Test:
        echo "$TEST"
        echo "$TEST" > FailedTest.json
        mv FailedTest.json $(date -d "today" +"%Y%m%d%H%M")GO.json # replace with scp to central server
    fi

    # python fails
    #if [ "$RESULT_PYTHON" -ne 0 ]; then
    #   echo Failed:
    #   echo Output_PYTHON:
    #   echo $OUTPUT_PYTHON
    #   echo Test:
    #   echo "$TEST"
    #   echo "$TEST" > FailedTest.json
    #   mv FailedTest.json $(date -d "today" +"%Y%m%d%H%M")PYTHON.json
    #fi

    # cppjit fails
    if [ "$RESULT_CPPJIT" -ne 0 ]; then
        echo Failed:
        echo Output_CPPJIT:
        echo $OUTPUT_CPPJIT
        echo Test:
        echo "$TEST"
        echo "$TEST" > FailedTest.json
        mv FailedTest.json $(date -d "today" +"%Y%m%d%H%M")CPPJIT.json
    fi
done