summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/build-systems/waf/cruft-contains-waf
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/build-systems/waf/cruft-contains-waf')
-rw-r--r--t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/fill-values3
-rw-r--r--t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/some-source.c5
-rw-r--r--t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/waf.in13
-rwxr-xr-xt/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/pre-upstream18
-rw-r--r--t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/desc2
-rw-r--r--t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/hints1
6 files changed, 42 insertions, 0 deletions
diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/fill-values b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/fill-values
new file mode 100644
index 0000000..772b2f0
--- /dev/null
+++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/fill-values
@@ -0,0 +1,3 @@
+Testname: cruft-contains-waf
+Skeleton: upload-non-native
+Description: Check for sources with waf
diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/some-source.c b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/some-source.c
new file mode 100644
index 0000000..6691108
--- /dev/null
+++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/some-source.c
@@ -0,0 +1,5 @@
+int fun(int a) {
+ /* There is a valid use for this... probably */
+ return (a * a) >> a;
+}
+
diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/waf.in b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/waf.in
new file mode 100644
index 0000000..4fc0412
--- /dev/null
+++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/orig/waf.in
@@ -0,0 +1,13 @@
+#!/usr/bin/python3
+# encoding: ISO-8859-1
+#
+
+# We just do a little python... for the show
+
+import os, sys
+if sys.hexversion<0x203000f: raise ImportError("Waf requires python >= 2.3")
+ # and we are pretending to be a waf script
+
+# okay, that's enough... below we will include a binary tarball...
+# That is as fun as it sounds (which is to say not a lot).
+
diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/pre-upstream b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/pre-upstream
new file mode 100755
index 0000000..12db812
--- /dev/null
+++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf/build-spec/pre-upstream
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Time to create a waf binary...
+
+set -e
+
+dir="$1"
+
+cd "$dir"
+
+tar cjf waf-bin.tar.bz2 some-source.c
+cp waf.in waf
+echo "#==>" >> waf
+echo -n "#" >> waf
+perl -pe 's,\n,\#\*,go; s,\r,\#\%,go;' waf-bin.tar.bz2 >> waf
+echo >> waf
+echo "#<==" >> waf
+rm waf-bin.tar.bz2
diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/desc b/t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/desc
new file mode 100644
index 0000000..2a6e758
--- /dev/null
+++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/desc
@@ -0,0 +1,2 @@
+Testname: cruft-contains-waf
+Check: build-systems/waf
diff --git a/t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/hints b/t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/hints
new file mode 100644
index 0000000..4ae22a2
--- /dev/null
+++ b/t/recipes/checks/build-systems/waf/cruft-contains-waf/eval/hints
@@ -0,0 +1 @@
+cruft-contains-waf (source): source-contains-waf-binary [waf]