From 1cf925a37c3ddfdd8dc93ccbe16f5d60143fdf31 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Mon, 27 Sep 2021 15:27:29 +0800 Subject: [PATCH] * Copy common folder to tmp. --- test/data/user.yaml | 1 - test/data/zentao/config.php | 2 +- test/lib/utils.php | 6 ++++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test/data/user.yaml b/test/data/user.yaml index f5ad81dc07..e732a92567 100644 --- a/test/data/user.yaml +++ b/test/data/user.yaml @@ -3,7 +3,6 @@ author: ly version: "1.0" fields: - field: id - note: "ID" range: 1-10000 - field: company range: 1 diff --git a/test/data/zentao/config.php b/test/data/zentao/config.php index d11ae2d81c..86288f49c2 100644 --- a/test/data/zentao/config.php +++ b/test/data/zentao/config.php @@ -4,4 +4,4 @@ $builder->programGrade1 = array('rows' => 40, 'data' => array('project', 'progra $builder->programGrade2 = array('rows' => 40, 'data' => array('project', 'program', 'programgrade2')); $builder->programGrade3 = array('rows' => 40, 'data' => array('project', 'program', 'programgrade3')); -//$builder->user = array('rows' => 100, 'data' => array('user')); +$builder->user = array('rows' => 100, 'data' => array('user')); diff --git a/test/lib/utils.php b/test/lib/utils.php index 26cade38fe..a7bddb55cc 100644 --- a/test/lib/utils.php +++ b/test/lib/utils.php @@ -100,6 +100,12 @@ function zdRun() $dbh->exec("set names 'utf8'"); $dbh->beginTransaction(); + /* Copy common to tmp. */ + $tmpCommonPath = RUNTIME_ROOT . 'tmp/common'; + if(file_exists($tmpCommonPath)) system("rm -rf $tmpCommonPath"); + system("cp -r {$zdRoot}common $tmpCommonPath"); + + /* Generate SQL files. */ $command = "$zdPath -c %s -d $zdRoot%s -n %s -o {$zdRoot}sql/%s.sql -table %s"; $tables = array(); foreach($builder as $key => $info)