From e7bf8054da5d4ef399c26fbe0c2ed3afabe76823 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sat, 19 Aug 2017 19:27:24 +0300 Subject: [PATCH] functest: fix existing scripts A few minor adjustments to make what we currently have work, while I prepare new func tests. Fixes #175 Signed-off-by: Ruslan Kuprieiev --- functest/clean.sh | 4 ++-- functest/{common.rc => common.sh} | 5 ++++- functest/init.sh | 3 ++- functest/test-repro-code.sh | 4 +++- functest/tutorial_end_to_end.sh | 3 +++ 5 files changed, 14 insertions(+), 5 deletions(-) rename functest/{common.rc => common.sh} (91%) diff --git a/functest/clean.sh b/functest/clean.sh index f75d4f11e..8e84c920e 100755 --- a/functest/clean.sh +++ b/functest/clean.sh @@ -1,5 +1,5 @@ +#!/bin/bash -source common.rc +source common.sh rm -rf $RAW_DATA_LOCAL $CODE_LOCAL $TEST_REPO - diff --git a/functest/common.rc b/functest/common.sh similarity index 91% rename from functest/common.rc rename to functest/common.sh index dda00a5f8..dfab8f296 100644 --- a/functest/common.rc +++ b/functest/common.sh @@ -1,3 +1,6 @@ +#!/bin/bash + +set -e BASE_DIR_S3=https://s3-us-west-2.amazonaws.com/dataversioncontrol/functests RAW_DATA_S3=$BASE_DIR_S3/stackoverflow_raw_small @@ -17,7 +20,7 @@ function _init_repo() { dvc_info 'import xml files' mkdir data/xml - dvc data-import ../$RAW_DATA_LOCAL/* data/xml + dvc import ../$RAW_DATA_LOCAL/* data/xml dvc_info 'copy code' mkdir code diff --git a/functest/init.sh b/functest/init.sh index 7ef46b650..0e88babad 100755 --- a/functest/init.sh +++ b/functest/init.sh @@ -1,5 +1,6 @@ +#!/bin/bash -source common.rc +source common.sh ./clean.sh diff --git a/functest/test-repro-code.sh b/functest/test-repro-code.sh index 479131f0a..18653d582 100755 --- a/functest/test-repro-code.sh +++ b/functest/test-repro-code.sh @@ -1,6 +1,8 @@ #!/bin/bash -source common.rc +set -e + +source common.sh function run_test() { mkdir data/tsv diff --git a/functest/tutorial_end_to_end.sh b/functest/tutorial_end_to_end.sh index 26ffdb58c..e209023d6 100755 --- a/functest/tutorial_end_to_end.sh +++ b/functest/tutorial_end_to_end.sh @@ -1,3 +1,6 @@ +#!/bin/bash + +set -e # 1. First ML model