diff --git a/.travis.yml b/.travis.yml index e0bd0e1c0..e4ac2e111 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,31 +1,6 @@ dist: bionic jobs: include: - - stage: "Agent Unit Tests" - name: "agent-unit-tests" - language: python - python: - - "3.6" - before_install: - - sudo apt-get update - install: - # Perl JSON and JSON-XS required - - sudo apt-get install libjson-perl libjson-xs-perl - script: ./agent/run-unittests - - - stage: "Server Unit Tests" - name: "server-unit-tests" - language: python - python: - - "3.6" - env: - - PBENCH_UNITTEST_SERVER_MODE=serial - before_install: - - sudo apt-get update - install: - - pip install elasticsearch sh boto3 - script: ./server/bin/unittests - - stage: "Dashboard Unit Tests" name: "dashboard-unit-tests" language: node_js @@ -40,7 +15,7 @@ jobs: - sudo echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - sudo apt-get update -y -qq - sudo apt-get install -y -qq yarn - script: ./web-server/v0.4/unittests + script: ./unittests - stage: "Dashboard E2E Tests" name: "dashboard-e2e-tests" @@ -65,4 +40,4 @@ jobs: - sudo echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - sudo apt-get update -y -qq - sudo apt-get install -y -qq yarn - script: ./web-server/v0.4/e2etests + script: ./e2etests diff --git a/ansible/README.md b/ansible/README.md index fd4624974..fa2cc668c 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -5,7 +5,7 @@ This will ease installation, and deployment of the pbench dashboard. - Ansible needs to be installed on the host where you want to run this playbook - An inventory file containing the following key values defined: - "`elasticsearch_url`", "`results_url`", "`graphql_url`", "`run_index`", "`prefix`" - See the `/web-server/v0.4/README.md` for more details. + See the `/README.md` for more details. ## Run Running the below commands from this checked-out directory to install the @@ -18,7 +18,7 @@ inventory file. See the `inventory` file in this directory for an example. ``` $ # First add a link to the "dist" folder where the dashboard will be built. -$ ln -sf ../../../web-server/v0.4/dist dist +$ ln -sf ../dist dist $ ansible-playbook -i inventory dashboard-install.yml $ ansible-playbook -i inventory dashboard-deploy.yml ``` diff --git a/run-e2etests b/run-e2etests deleted file mode 100755 index 67b09f233..000000000 --- a/run-e2etests +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -dir=$(dirname $0) -let sts=0 - -function tail_and_wait { - pid=$1 - name=$2 - file=$3 - printf -- "+++ ${name} E2E Tests +++\n\n" - - tail -n 9999999 -f ${file} --pid ${pid} - if [[ $? -ne 0 ]]; then - printf -- "tail -f ${file} --pid ${pid} failed\n" >&2 - return 1 - fi - wait ${pid} - let tw_sts=$? - if [[ $tw_sts -ne 0 ]]; then - status="FAILED" - else - status="SUCCEEDED" - fi - rm -f ${file} - - printf -- "\n--- ${name} E2E Tests ($status) ---\n" - return $tw_sts -} - -trap "kill -KILL -$$ > /dev/null 2>&1" INT TERM QUIT - -> /var/tmp/dashboard.out -$dir/web-server/v0.4/e2etests > /var/tmp/dashboard.out 2>&1 < /dev/null & -dpid=$! - -tail_and_wait $dpid 'Dashboard' /var/tmp/dashboard.out -let sts=sts+$? - -if [ $sts -gt 0 ]; then - echo "E2E tests FAILED" -fi -exit $sts diff --git a/run-unittests b/run-unittests deleted file mode 100755 index 7cf48dd2f..000000000 --- a/run-unittests +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -dir=$(dirname $0) -let sts=0 - -function tail_and_wait { - pid=$1 - name=$2 - file=$3 - printf -- "+++ ${name} Unit Tests +++\n\n" - - tail -n 9999999 -f ${file} --pid ${pid} - if [[ $? -ne 0 ]]; then - printf -- "tail -f ${file} --pid ${pid} failed\n" >&2 - return 1 - fi - wait ${pid} - let tw_sts=$? - if [[ $tw_sts -ne 0 ]]; then - status="FAILED" - else - status="SUCCEEDED" - fi - rm -f ${file} - - printf -- "\n--- ${name} Unit Tests ($status) ---\n" - return $tw_sts -} - -trap "kill -KILL -$$ > /dev/null 2>&1" INT TERM QUIT - -> /var/tmp/agent.out -$dir/agent/run-unittests > /var/tmp/agent.out 2>&1 < /dev/null & -apid=$! - -> /var/tmp/server.out -$dir/server/bin/unittests > /var/tmp/server.out 2>&1 < /dev/null & -spid=$! - -> /var/tmp/dashboard.out -$dir/web-server/v0.4/unittests > /var/tmp/dashboard.out 2>&1 < /dev/null & -dpid=$! - -tail_and_wait $apid 'Agent' /var/tmp/agent.out -let sts=sts+$? - -printf -- "\n\n\n" - -tail_and_wait $spid 'Server' /var/tmp/server.out -let sts=sts+$? - -printf -- "\n\n\n" - -tail_and_wait $dpid 'Dashboard' /var/tmp/dashboard.out -let sts=sts+$? - -if [ $sts -gt 0 ]; then - echo "Unit tests FAILED" -fi -exit $sts