testsuite: add Clear's mkosi configuration
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 8 Feb 2018 23:08:22 +0000 (15:08 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 9 Feb 2018 00:38:08 +0000 (16:38 -0800)
Adapted the mkosi.build script to account for not building
test-modules in Clear. It doesn't have the headers available yet.

testsuite/mkosi/mkosi.build
testsuite/mkosi/mkosi.clear [new file with mode: 0644]

index 53fc797..8ed54bb 100755 (executable)
@@ -29,8 +29,13 @@ rm -rf build
 mkdir build
 cd build
 
-kdir=$(find_kdir)
-IFS=/ read _ _ _ kver _ <<<"$kdir"
+if grep clear-linux-os /usr/lib/os-release; then
+    # Clear Linux doesn't have the dependencies for those yet.
+    echo "--disable-test-modules" > ../../.config.args
+else
+    kdir=$(find_kdir)
+    IFS=/ read _ _ _ kver _ <<<"$kdir"
+fi
 
 ../autogen.sh c
 make -j
diff --git a/testsuite/mkosi/mkosi.clear b/testsuite/mkosi/mkosi.clear
new file mode 100644 (file)
index 0000000..6d87514
--- /dev/null
@@ -0,0 +1,19 @@
+[Distribution]
+Distribution=clear
+Release=latest
+
+[Output]
+Output = clear-image.raw
+
+[Packages]
+Packages=
+       os-core-update
+BuildPackages=
+       os-core-dev
+
+[Partitions]
+RootSize = 5G
+
+[Host]
+# This is where swupd-extract is usually installed.
+ExtraSearchPaths=$SUDO_HOME/go/bin
\ No newline at end of file