From a0dd0a13db1004ca86cf257ebbd9c3e714da32ea Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 7 Nov 2013 14:35:02 +0100 Subject: Take rules into account when tracking changes. This will cause rebuilding if, for example, a rule in a module that the product uses gets its source code changed (and the rule is actually being used). Change-Id: I009685c85fcc8fa0ae3ecc7c32194685a1558104 Reviewed-by: Joerg Bornemann --- .../propertyChanges/modules/TestModule/module.qbs | 28 ++++++++++++++++++++++ .../blackbox/testdata/propertyChanges/project.qbs | 4 ++++ .../blackbox/testdata/propertyChanges/ruletest.qbs | 7 ++++++ .../auto/blackbox/testdata/propertyChanges/test.in | 1 + 4 files changed, 40 insertions(+) create mode 100644 tests/auto/blackbox/testdata/propertyChanges/modules/TestModule/module.qbs create mode 100644 tests/auto/blackbox/testdata/propertyChanges/ruletest.qbs create mode 100644 tests/auto/blackbox/testdata/propertyChanges/test.in (limited to 'tests/auto/blackbox/testdata/propertyChanges') diff --git a/tests/auto/blackbox/testdata/propertyChanges/modules/TestModule/module.qbs b/tests/auto/blackbox/testdata/propertyChanges/modules/TestModule/module.qbs new file mode 100644 index 000000000..ef14d3f47 --- /dev/null +++ b/tests/auto/blackbox/testdata/propertyChanges/modules/TestModule/module.qbs @@ -0,0 +1,28 @@ +import qbs +import qbs.File + +Module { + FileTagger { + pattern: "*.in" + fileTags: "test-input" + } + + Rule { + inputs: ['test-input'] + Artifact { + fileTags: "test-output" + fileName: input.fileName + ".out" + } + + prepare: { + var cmd = new JavaScriptCommand(); + cmd.highlight = "codegen"; + cmd.description = "Making output from input"; + cmd.sourceCode = function() { + // print('Change in source code'); + File.copy(input.fileName, output.fileName); + } + return cmd; + } + } +} diff --git a/tests/auto/blackbox/testdata/propertyChanges/project.qbs b/tests/auto/blackbox/testdata/propertyChanges/project.qbs index 4be63101f..9bccb5d06 100644 --- a/tests/auto/blackbox/testdata/propertyChanges/project.qbs +++ b/tests/auto/blackbox/testdata/propertyChanges/project.qbs @@ -44,4 +44,8 @@ Project { } } } + + references: "ruletest.qbs" + + qbsSearchPaths: "." } diff --git a/tests/auto/blackbox/testdata/propertyChanges/ruletest.qbs b/tests/auto/blackbox/testdata/propertyChanges/ruletest.qbs new file mode 100644 index 000000000..02088da7b --- /dev/null +++ b/tests/auto/blackbox/testdata/propertyChanges/ruletest.qbs @@ -0,0 +1,7 @@ +import qbs + +Product { + type: "test-output" + Depends { name: "TestModule" } + files: "test.in" +} diff --git a/tests/auto/blackbox/testdata/propertyChanges/test.in b/tests/auto/blackbox/testdata/propertyChanges/test.in new file mode 100644 index 000000000..8633abf18 --- /dev/null +++ b/tests/auto/blackbox/testdata/propertyChanges/test.in @@ -0,0 +1 @@ +blubb -- cgit v1.2.3