aboutsummaryrefslogtreecommitdiffstats
path: root/vm/vm_test.go
diff options
context:
space:
mode:
authorKris Alder <kalder@google.com>2023-02-22 10:20:49 -0800
committerTaras Madan <tarasmadan@google.com>2023-03-08 08:03:06 +0100
commitf6ef8c9d1dbba2449eec47d79ae047c30476dff2 (patch)
treee07a7e97494322adb0bdfdff8dfc27ee96a022b6 /vm/vm_test.go
parentd2b001709254b71636892f5b9d0ed14a4ca04f61 (diff)
pkg/build: add build code for Android devices
Booting physical Android devices requires building a few artifacts, as described at https://source.android.com/docs/setup/build/building-kernels. When a ProxyVM type is used, we need to differentiate whether or not to use the Android build logic, so we add an additional mapping which uses a different name but the same VM logic.
Diffstat (limited to 'vm/vm_test.go')
-rw-r--r--vm/vm_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/vm/vm_test.go b/vm/vm_test.go
index d3429f5f7..9c190cf50 100644
--- a/vm/vm_test.go
+++ b/vm/vm_test.go
@@ -397,3 +397,19 @@ func testMonitorExecution(t *testing.T, test *Test) {
t.Fatalf("want output:\n%s\n\ngot output:\n%s\n", test.Report.Output, rep.Output)
}
}
+
+func TestVMType(t *testing.T) {
+ testCases := []struct {
+ in string
+ want string
+ }{
+ {"gvisor", "gvisor"},
+ {"proxyapp:android", "proxyapp"},
+ }
+
+ for _, tc := range testCases {
+ if got := vmType(tc.in); got != tc.want {
+ t.Errorf("vmType(%q) = %q, want %q", tc.in, got, tc.want)
+ }
+ }
+}