From 7a319220783acb292e54e75d9fa50946f1ada754 Mon Sep 17 00:00:00 2001 From: Fabian Date: Sun, 4 Nov 2018 16:58:20 -0600 Subject: [PATCH] Add test for bzimage_initrd_from_filesystem --- Makefile | 6 ++++++ tests/full/run.js | 26 +++++++++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1959e36b..9ccfbaee 100644 --- a/Makefile +++ b/Makefile @@ -232,6 +232,12 @@ $(CLOSURE): rm $(CLOSURE_DIR)/compiler-latest.zip tests: all-debug + mkdir -p images/integration-test-fs/flat + cp images/bzImage images/integration-test-fs/ + touch images/integration-test-fs/initrd + cd images/integration-test-fs && tar cfv fs.tar bzImage initrd + ./tools/fs2json.py images/integration-test-fs/fs.tar --out images/integration-test-fs/fs.json + ./tools/copy-to-sha256.py images/integration-test-fs/fs.tar images/integration-test-fs/flat ./tests/full/run.js nasmtests: all-debug diff --git a/tests/full/run.js b/tests/full/run.js index c73103d7..1485638e 100755 --- a/tests/full/run.js +++ b/tests/full/run.js @@ -228,6 +228,21 @@ if(cluster.isMaster) ], expect_mouse_registered: true, }, + { + name: "Linux 4 with bzImage from filesystem", + bzimage_initrd_from_filesystem: true, + filesystem: { + basefs: "./images/integration-test-fs/fs.json", + baseurl: "./images/integration-test-fs/flat/", + }, + cmdline: "auto", + timeout: 200, + expected_texts: [ + "~%", + "Files send via emulator appear in", + ], + expect_mouse_registered: true, + }, { name: "OpenBSD", fda: root_path + "/images/openbsd.img", @@ -461,7 +476,7 @@ function run_test(test, done) { console.log("Starting test: %s", test.name); - let image = test.fda || test.hda || test.cdrom || test.bzimage; + let image = test.fda || test.hda || test.cdrom || test.bzimage || test.filesystem.basefs; console.assert(image, "Bootable drive expected"); if(!fs.existsSync(image)) @@ -518,13 +533,18 @@ function run_test(test, done) } if(test.hda) { - settings.hda = { url: test.hda, async: true, }; + settings.hda = { url: test.hda, async: true }; } if(test.bzimage) { - settings.bzimage = { url: test.bzimage, async: true, }; + settings.bzimage = { url: test.bzimage }; + } + if(test.filesystem) + { + settings.filesystem = test.filesystem; } settings.cmdline = test.cmdline; + settings.bzimage_initrd_from_filesystem = test.bzimage_initrd_from_filesystem; if(test.expected_texts) {