summaryrefslogtreecommitdiff
path: root/tests/auto/blackbox/testdata-baremetal
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/blackbox/testdata-baremetal')
-rw-r--r--tests/auto/blackbox/testdata-baremetal/do-not-generate-compiler-listing/do-not-generate-compiler-listing.qbs20
-rw-r--r--tests/auto/blackbox/testdata-baremetal/do-not-generate-compiler-listing/fun.c4
-rw-r--r--tests/auto/blackbox/testdata-baremetal/do-not-generate-compiler-listing/main.c6
-rw-r--r--tests/auto/blackbox/testdata-baremetal/generate-compiler-listing/fun.c4
-rw-r--r--tests/auto/blackbox/testdata-baremetal/generate-compiler-listing/generate-compiler-listing.qbs20
-rw-r--r--tests/auto/blackbox/testdata-baremetal/generate-compiler-listing/main.c6
6 files changed, 60 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata-baremetal/do-not-generate-compiler-listing/do-not-generate-compiler-listing.qbs b/tests/auto/blackbox/testdata-baremetal/do-not-generate-compiler-listing/do-not-generate-compiler-listing.qbs
new file mode 100644
index 000000000..5ae0316c7
--- /dev/null
+++ b/tests/auto/blackbox/testdata-baremetal/do-not-generate-compiler-listing/do-not-generate-compiler-listing.qbs
@@ -0,0 +1,20 @@
+import "../BareMetalApplication.qbs" as BareMetalApplication
+
+BareMetalApplication {
+ condition: {
+ if (qbs.toolchainType === "iar")
+ return true;
+ if (qbs.toolchainType === "keil") {
+ if (qbs.architecture === "mcs51"
+ || qbs.architecture === "mcs251"
+ || qbs.architecture === "c166") {
+ return true;
+ }
+ }
+ console.info("unsupported toolset: %%"
+ + qbs.toolchainType + "%%, %%" + qbs.architecture + "%%");
+ return false;
+ }
+ cpp.generateCompilerListingFiles: false
+ files: ["main.c", "fun.c"]
+}
diff --git a/tests/auto/blackbox/testdata-baremetal/do-not-generate-compiler-listing/fun.c b/tests/auto/blackbox/testdata-baremetal/do-not-generate-compiler-listing/fun.c
new file mode 100644
index 000000000..3b8c8f2f4
--- /dev/null
+++ b/tests/auto/blackbox/testdata-baremetal/do-not-generate-compiler-listing/fun.c
@@ -0,0 +1,4 @@
+int f(void)
+{
+ return 0;
+}
diff --git a/tests/auto/blackbox/testdata-baremetal/do-not-generate-compiler-listing/main.c b/tests/auto/blackbox/testdata-baremetal/do-not-generate-compiler-listing/main.c
new file mode 100644
index 000000000..2c3d7726c
--- /dev/null
+++ b/tests/auto/blackbox/testdata-baremetal/do-not-generate-compiler-listing/main.c
@@ -0,0 +1,6 @@
+extern int f(void);
+
+int main(void)
+{
+ return f();
+}
diff --git a/tests/auto/blackbox/testdata-baremetal/generate-compiler-listing/fun.c b/tests/auto/blackbox/testdata-baremetal/generate-compiler-listing/fun.c
new file mode 100644
index 000000000..3b8c8f2f4
--- /dev/null
+++ b/tests/auto/blackbox/testdata-baremetal/generate-compiler-listing/fun.c
@@ -0,0 +1,4 @@
+int f(void)
+{
+ return 0;
+}
diff --git a/tests/auto/blackbox/testdata-baremetal/generate-compiler-listing/generate-compiler-listing.qbs b/tests/auto/blackbox/testdata-baremetal/generate-compiler-listing/generate-compiler-listing.qbs
new file mode 100644
index 000000000..aebbfb664
--- /dev/null
+++ b/tests/auto/blackbox/testdata-baremetal/generate-compiler-listing/generate-compiler-listing.qbs
@@ -0,0 +1,20 @@
+import "../BareMetalApplication.qbs" as BareMetalApplication
+
+BareMetalApplication {
+ condition: {
+ if (qbs.toolchainType === "iar")
+ return true;
+ if (qbs.toolchainType === "keil") {
+ if (qbs.architecture === "mcs51"
+ || qbs.architecture === "mcs251"
+ || qbs.architecture === "c166") {
+ return true;
+ }
+ }
+ console.info("unsupported toolset: %%"
+ + qbs.toolchainType + "%%, %%" + qbs.architecture + "%%");
+ return false;
+ }
+ cpp.generateCompilerListingFiles: true
+ files: ["main.c", "fun.c"]
+}
diff --git a/tests/auto/blackbox/testdata-baremetal/generate-compiler-listing/main.c b/tests/auto/blackbox/testdata-baremetal/generate-compiler-listing/main.c
new file mode 100644
index 000000000..2c3d7726c
--- /dev/null
+++ b/tests/auto/blackbox/testdata-baremetal/generate-compiler-listing/main.c
@@ -0,0 +1,6 @@
+extern int f(void);
+
+int main(void)
+{
+ return f();
+}