summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-10-08 18:27:31 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2014-10-13 14:06:13 +0200
commit9808c3e42d8533b92d6af80c72325f894194e2da (patch)
treeefd7da45cae3d491398bb350848737cc486db926
parent5c6e512cfc3b7251a6611e05aad80efa6a3102b9 (diff)
fix race condition in Tests::inlineFiles
All test targets depend on "init". test_keepFile depends on test_fileRemoval, because both write into post_check.cmd. Change-Id: Ic86d428978878d0e009f7c32360376adaa730c98 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--tests/makefiles/blackbox/inlineFiles/test.mk10
-rw-r--r--tests/tests.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/makefiles/blackbox/inlineFiles/test.mk b/tests/makefiles/blackbox/inlineFiles/test.mk
index a7fadaf..ab95ca9 100644
--- a/tests/makefiles/blackbox/inlineFiles/test.mk
+++ b/tests/makefiles/blackbox/inlineFiles/test.mk
@@ -15,7 +15,7 @@ init:
post_check:
@output\post_check.cmd
-test_basic:
+test_basic: init
copy << output\test_basic.txt
line 1
!ifndef UNDEFINED_MACRO
@@ -24,7 +24,7 @@ line 2
line 3
<<
-test_fileRemoval:
+test_fileRemoval: init
echo @if exist << exit /b 1 >> output\post_check.cmd
some random text
<<
@@ -35,12 +35,12 @@ some random text
some random text
<<NOKEEP
-test_keepFile:
+test_keepFile: test_fileRemoval
echo @if not exist <<"output\named inline file3.txt" exit /b 1 >> output\post_check.cmd
some random text
<<KEEP
-test_multipleFiles:
+test_multipleFiles: init
type << << >output\test_multipleFiles.txt
one
two
@@ -49,7 +49,7 @@ three
four
<<
-test_escaping:
+test_escaping: init
copy << output\test_escaping.txt
InRoot$$$$Sections
# This line should be there.
diff --git a/tests/tests.cpp b/tests/tests.cpp
index 83e4c77..d6a8191 100644
--- a/tests/tests.cpp
+++ b/tests/tests.cpp
@@ -1096,7 +1096,7 @@ void Tests::ignoreExitCodes()
void Tests::inlineFiles()
{
- QVERIFY(runJom(QStringList() << "/f" << "test.mk" << "init" << "tests", "blackbox/inlineFiles"));
+ QVERIFY(runJom(QStringList() << "/f" << "test.mk" << "tests", "blackbox/inlineFiles"));
QCOMPARE(m_jomProcess->exitCode(), 0);
QVERIFY(fileContentsEqual("blackbox/inlineFiles/test_basic_expected.txt", "blackbox/inlineFiles/output/test_basic.txt"));
QVERIFY(fileContentsEqual("blackbox/inlineFiles/test_multipleFiles_expected.txt", "blackbox/inlineFiles/output/test_multipleFiles.txt"));