summaryrefslogtreecommitdiffstats
path: root/tests/aux
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-17 17:12:55 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-17 17:12:55 (EDT)
commit529fb12cb56c379a3364a731201e411300b6ad7a (patch)
tree49c364e246f6203f82f5ef21cc46060536c4f697 /tests/aux
parent9906f96c9acbf9cbce91ca7cca5beab2e43574f8 (diff)
tests/aux/common.sh: Set SPF 2.0 env vars
Don't bother setting these in every test script. Also set a non-native package version in tests/aux/setup.sh.
Diffstat (limited to 'tests/aux')
-rw-r--r--tests/aux/common.sh23
-rw-r--r--tests/aux/setup.sh2
2 files changed, 24 insertions, 1 deletions
diff --git a/tests/aux/common.sh b/tests/aux/common.sh
index 896790f..2ebdc9e 100644
--- a/tests/aux/common.sh
+++ b/tests/aux/common.sh
@@ -69,3 +69,26 @@ cmd_is()
}
cd "${TOP_BUILDDIR}/tests/pkg/tmp/"
+
+# SPF 2.0 environment variables:
+# <http://specs.proteanos.com/spf-2.0/buildsys.html#env-vars>
+# Section 7.3.1 Package Variables
+export OPK_SOURCE='foo'
+export OPK_SOURCE_VERSION='1.0-1'
+export OPK_SOURCE_VERSION_UPSTREAM='1.0'
+export OPK_BINARY_VERSION='1.0-1'
+export OPK_PACKAGES='' # TODO
+# Section 7.3.2 Build and Host System Variables
+# OPK_BUILD_ARCH_GNU and OPK_HOST_ARCH_GNU aren't set or used by opkbuild
+# utilities. These should be removed from the SPF.
+export OPK_BUILD_ARCH='amd64-linux-glibc'
+export OPK_BUILD_ARCH_CPU='amd64'
+export OPK_BUILD_ARCH_KERNEL='linux'
+export OPK_BUILD_ARCH_LIBS='glibc'
+export OPK_BUILD_PLAT='dev'
+export OPK_HOST_ARCH='i686-linux-glibc'
+export OPK_HOST_ARCH_CPU='i686'
+export OPK_HOST_ARCH_KERNEL='linux'
+export OPK_HOST_ARCH_LIBS='glibc'
+export OPK_HOST_PLAT='x60'
+# Section 7.3.3 Toolchain Variables aren't used by opkbuild utilities.
diff --git a/tests/aux/setup.sh b/tests/aux/setup.sh
index 0d42223..ca91b8c 100644
--- a/tests/aux/setup.sh
+++ b/tests/aux/setup.sh
@@ -36,7 +36,7 @@ cat >'control' <<-EOF
EOF
cat >'changelog' <<-EOF
- foo (1.0) trunk
+ foo (1.0-1) trunk
* Initial release.
-- ${MAINTAINER} Thu, 01 Jan 1970 00:00:00 +0000
EOF