@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+set -e
+mkdir -p images
+(cd images && curl --compressed -OOOOOOOOOO https://copy.sh/v86/images/{linux.iso,linux3.iso,kolibri.img,windows101.img,os8.dsk,freedos722.img,openbsd.img,oberon.dsk,oberon-boot.dsk})
+make build/libv86.js
+tests/full/run.js
@@ -0,0 +1,5 @@
+(cd tests/kvm-unit-tests && ./configure && make)
+tests/kvm-unit-tests/run.js tests/kvm-unit-tests/x86/realmode.flat
@@ -1,10 +1,8 @@
language: node_js
node_js:
- - "5.0.0"
+ - "6.10.2"
script:
- - mkdir -p images
- - cd images
- - curl --compressed -OOOOOOOOOO https://copy.sh/v86/images/{linux.iso,linux3.iso,kolibri.img,windows101.img,os8.dsk,freedos722.img,openbsd.img,oberon.dsk,oberon-boot.dsk}
- - cd ..
- - make build/libv86.js
- - npm test
+ - "./.travis-run-$TESTSUITE.sh"
+env:
+ - TEST_SUITE=unit
+ - TEST_SUITE=integration
@@ -17,6 +17,9 @@ make -C ../../build/libv86.js
Tests can also be run in browser by going to `?profile=test-$name` (for
example, `?profile=test-realmode`).
+Most tests require you to set `ENABLE_ACPI` to `true` in `src/config.js`
+(currently not the default).
+
# Welcome to kvm-unit-tests
@@ -31,6 +31,19 @@ var emulator = new V86({
memory_size: 256 * 1024 * 1024,
});
+emulator.bus.register("emulator-started", function()
+{
+ emulator.v86.cpu.io.register_write_consecutive(0xF4, this,
+ function(value)
+ {
+ console.log("Test exited with code " + value);
+ process.exit(value);
+ },
+ function() {},
+ function() {});
+});
emulator.add_listener("serial0-output-char", function(chr)
{
process.stdout.write(chr);