diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index abb5026089f73bdba17438c6353d8e8dc6c1cc6d..202e3cb40a9a49d7551417e656f2a28697a6d2c5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,6 +76,7 @@ installbinaries: - bin/gateway --version artifacts: when: always + expire_in: '1 day' paths: - bin/ @@ -90,6 +91,7 @@ basice2e: - cd .. artifacts: when: always + expire_in: '1 day' paths: - basice2e/results/ - bin/ @@ -112,42 +114,45 @@ basice2e: # - cd .. # artifacts: # when: always +# expire_in: '1 day' # paths: # - basice2e/ # - bin/ -# smokeinfra: -# stage: tests -# image: $DOCKER_IMAGE -# script: -# - mkdir -p ~/.elixxir -# - echo $PWD -# - cd smokeinfra -# - ./run.sh -# - cd .. -# artifacts: -# when: always -# paths: -# - smokeinfra/results/ -# - bin/ +smokeinfra: + stage: tests + image: $DOCKER_IMAGE + script: + - mkdir -p ~/.elixxir + - echo $PWD + - cd smokeinfra + - ./run.sh + - cd .. + artifacts: + when: always + expire_in: '1 day' + paths: + - smokeinfra/results/ + - bin/ -# smokeinfraBatch4: -# stage: tests -# image: $DOCKER_IMAGE -# script: -# - mkdir -p ~/.elixxir -# - echo $PWD -# - cd smokeinfra -# - git checkout -- . -# - sed -i 's/\ 42/\ 4/g' *.yaml -# - ./run.sh -# - cd .. -# artifacts: -# when: always -# paths: -# - smokeinfra/results/ -# - bin/ +smokeinfraBatch4: + stage: tests + image: $DOCKER_IMAGE + script: + - mkdir -p ~/.elixxir + - echo $PWD + - cd smokeinfra + - git checkout -- . + - sed -i 's/\ 42/\ 4/g' *.yaml + - ./run.sh + - cd .. + artifacts: + when: always + expire_in: '1 day' + paths: + - smokeinfra/results/ + - bin/ # smokeinfraBatch1: # stage: tests @@ -162,6 +167,7 @@ basice2e: # - cd .. # artifacts: # when: always +# expire_in: '1 day' # paths: # - smokeinfra/results/ # - bin/ @@ -176,6 +182,7 @@ benchmark: - ./bin/server benchmark -b 1024 -n 5 -i 1 artifacts: when: always + expire_in: '1 day' paths: - bin/ only: diff --git a/smokeinfra/gateway-1.yaml b/smokeinfra/gateway-1.yaml index bf28a820307db9c6d9210eb71b0d2698f47cf369..b1bc8e077eb0ad20bf3bb49331764b1babe63819 100644 --- a/smokeinfra/gateway-1.yaml +++ b/smokeinfra/gateway-1.yaml @@ -11,6 +11,9 @@ log: "results/gateway-1.log" # Used for debugging verbose: "true" +# I am first node +firstNode: "true" + # The cMix nodes in the network cMixNodes: - "localhost:60000" diff --git a/smokeinfra/gateway-3.yaml b/smokeinfra/gateway-3.yaml index f8960c588226f3b501588a63e151ec746c8ea687..c45cf03236d33f0c076ae429c23e1f811a58f4c5 100644 --- a/smokeinfra/gateway-3.yaml +++ b/smokeinfra/gateway-3.yaml @@ -11,6 +11,9 @@ log: "results/gateway-3.log" # Used for debugging verbose: "true" +# I am last node +lastNode: "true" + # The cMix nodes in the network cMixNodes: - "localhost:60000" diff --git a/smokeinfra/run.sh b/smokeinfra/run.sh index 1abecc1fa133ea6bcdb0504be61bb82f62415cc0..3b6bf6c0fddcb3d9afdf57b5181bb52ce7d94df4 100755 --- a/smokeinfra/run.sh +++ b/smokeinfra/run.sh @@ -28,6 +28,8 @@ done echo "STARTING GATEWAYS..." +sleep 5 + # Start gateways for GWID in $(seq 3 -1 1) do @@ -38,10 +40,12 @@ do echo "$GATEWAYCMD -- $PIDVAL" done +sleep 120 + jobs -p > results/serverpids finish() { - echo "KILLED! STOPPING SERVERS AND GATEWAYS..." + echo "STOPPING SERVERS AND GATEWAYS..." # NOTE: jobs -p doesn't work in a signal handler for job in $(cat results/serverpids) do @@ -55,13 +59,6 @@ trap finish INT sleep 15 -echo "STOPPING SERVERS AND GATEWAYS..." -# NOTE: jobs -p doesn't work in a signal handler -for job in $(cat results/serverpids) -do - echo "Stopping $job" - kill $job -done echo "CHECKING OUTPUT FOR ERRORS" set +x @@ -83,6 +80,5 @@ if [ ! -s rid.txt ]; then exit 42 fi -echo "SUCCESS!" - tail $SERVERLOGS/*.console +echo "SUCCESS!"