浏览代码

Add a test in runtest that asserts the projects was build

Yann Weber 7 年前
父节点
当前提交
352730a585
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8
    1
      runtest

+ 8
- 1
runtest 查看文件

@@ -45,7 +45,14 @@
45 45
 #
46 46
 # https://docs.python.org/3.4/library/unittest.html
47 47
 #
48
+if test ! -f lodel/buildconf.py
49
+then
50
+	echo "You have to build the project before running the tests"
51
+	echo "See README"
52
+	exit 1
53
+fi
48 54
 
55
+PYTHON='env python3'
49 56
 testdir=$(mktemp -d)
50 57
 rmdir $testdir
51 58
 ./scripts/create_instance.sh test_instance $testdir &>/dev/null
@@ -55,6 +62,6 @@ cd $testdir
55 62
 rm -R conf.d && mv tests/tests_conf.d conf.d
56 63
 make
57 64
 make refresh_plugins
58
-python3 loader.py $@
65
+$PYTHON loader.py $@
59 66
 
60 67
 rm -Rf $testdir

正在加载...
取消
保存