From 9808c3e42d8533b92d6af80c72325f894194e2da Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 8 Oct 2014 18:27:31 +0200 Subject: 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 --- tests/makefiles/blackbox/inlineFiles/test.mk | 10 +++++----- tests/tests.cpp | 2 +- 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 <> output\post_check.cmd some random text <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")); -- cgit v1.2.3