From ccca1c1fed17e5586cce43a6519d0914761c1e2c Mon Sep 17 00:00:00 2001 From: Shubham Kumar Date: Fri, 29 May 2020 20:28:52 +0530 Subject: [PATCH] add tests to TC and update travis --- .travis.yml | 8 -------- taskcluster/tc-train-unittests.sh | 9 +-------- ...t-training-unittests_8k-linux-amd64-py35m-opt.yml | 12 ++++++++++++ ...t-training-unittests_8k-linux-amd64-py36m-opt.yml | 8 ++++---- ...t-training-unittests_8k-linux-amd64-py37m-opt.yml | 12 ++++++++++++ 5 files changed, 29 insertions(+), 20 deletions(-) create mode 100644 taskcluster/test-training-unittests_8k-linux-amd64-py35m-opt.yml create mode 100644 taskcluster/test-training-unittests_8k-linux-amd64-py37m-opt.yml diff --git a/.travis.yml b/.travis.yml index ca33852f..f64b1a34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,11 +20,3 @@ jobs: fi cardboardlinter --refspec $TRAVIS_BRANCH -n auto; fi - - name: python unit tests - install: - - pip install --upgrade -r requirements_tests.txt; - pip install --upgrade . - script: - - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - python -m unittest; - fi diff --git a/taskcluster/tc-train-unittests.sh b/taskcluster/tc-train-unittests.sh index dbae276e..4ed6931c 100644 --- a/taskcluster/tc-train-unittests.sh +++ b/taskcluster/tc-train-unittests.sh @@ -4,13 +4,7 @@ set -xe source $(dirname "$0")/tc-tests-utils.sh -extract_python_versions "$1" "pyver" "pyver_pkg" "py_unicode_type" "pyconf" "pyalias" - -bitrate=$2 - mkdir -p ${TASKCLUSTER_ARTIFACTS} || true -mkdir -p /tmp/train || true -mkdir -p /tmp/train_tflite || true virtualenv_activate "${pyalias}" "deepspeech" @@ -18,7 +12,6 @@ set -o pipefail pip install --upgrade pip==19.3.1 setuptools==45.0.0 wheel==0.33.6 | cat pushd ${HOME}/DeepSpeech/ds pip install --upgrade . | cat + python -m unittest popd set +o pipefail - -python -m unittest diff --git a/taskcluster/test-training-unittests_8k-linux-amd64-py35m-opt.yml b/taskcluster/test-training-unittests_8k-linux-amd64-py35m-opt.yml new file mode 100644 index 00000000..81490ec0 --- /dev/null +++ b/taskcluster/test-training-unittests_8k-linux-amd64-py35m-opt.yml @@ -0,0 +1,12 @@ +build: + template_file: test-linux-opt-base.tyml + dependencies: + - "linux-amd64-ctc-opt" + system_setup: + > + apt-get -qq update && apt-get -qq -y install ${training.packages_trusty.apt} + args: + tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-unittests.sh 3.5.8:m" + metadata: + name: "DeepSpeech on Linux AMD64 CPU training unittests using Python 3.5" + description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 Python 3.5, CPU only, optimized version" diff --git a/taskcluster/test-training-unittests_8k-linux-amd64-py36m-opt.yml b/taskcluster/test-training-unittests_8k-linux-amd64-py36m-opt.yml index d507fc7e..8ca12a88 100644 --- a/taskcluster/test-training-unittests_8k-linux-amd64-py36m-opt.yml +++ b/taskcluster/test-training-unittests_8k-linux-amd64-py36m-opt.yml @@ -6,8 +6,8 @@ build: > apt-get -qq update && apt-get -qq -y install ${training.packages_trusty.apt} args: - tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-unittests.sh 3.6.10:m 8k" + tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-unittests.sh 3.6.10:m" metadata: - name: "DeepSpeech Linux AMD64 CPU 8kHz training Py3.6" - description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 8kHz Python 3.6, CPU only, optimized version" - \ No newline at end of file + name: "DeepSpeech on Linux AMD64 CPU training unittests using Python 3.6" + description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 Python 3.6, CPU only, optimized version" + \ No newline at end of file diff --git a/taskcluster/test-training-unittests_8k-linux-amd64-py37m-opt.yml b/taskcluster/test-training-unittests_8k-linux-amd64-py37m-opt.yml new file mode 100644 index 00000000..3b34eadc --- /dev/null +++ b/taskcluster/test-training-unittests_8k-linux-amd64-py37m-opt.yml @@ -0,0 +1,12 @@ +build: + template_file: test-linux-opt-base.tyml + dependencies: + - "linux-amd64-ctc-opt" + system_setup: + > + apt-get -qq update && apt-get -qq -y install ${training.packages_trusty.apt} + args: + tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-unittests.sh 3.7.6:m" + metadata: + name: "DeepSpeech on Linux AMD64 CPU training unittests using Python 3.7" + description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 Python 3.7, CPU only, optimized version"