mehrdadh commented on a change in pull request #8190:
URL: https://github.com/apache/tvm/pull/8190#discussion_r649601216



##########
File path: apps/microtvm/reference-vm/base-box-tool.py
##########
@@ -293,19 +318,34 @@ def do_run_release_test(release_test_dir, provider_name, 
test_config, test_devic
         os.path.join(release_test_dir, ".vagrant", "machines", "default", 
provider_name, "id")
     ) as f:
         machine_uuid = f.read()
-    ATTACH_USB_DEVICE[provider_name](
-        machine_uuid,
-        vid_hex=test_config["vid_hex"],
-        pid_hex=test_config["pid_hex"],
-        serial=test_device_serial,
-    )
+
+    # Check if target is not QEMU
+    if test_config["vid_hex"] and test_config["pid_hex"]:
+        ATTACH_USB_DEVICE[provider_name](
+            machine_uuid,
+            vid_hex=test_config["vid_hex"],
+            pid_hex=test_config["pid_hex"],
+            serial=test_device_serial,
+        )
     tvm_home = os.path.realpath(os.path.join(THIS_DIR, "..", "..", ".."))
 
     def _quote_cmd(cmd):
         return " ".join(shlex.quote(a) for a in cmd)
 
-    test_cmd = _quote_cmd(["cd", tvm_home]) + " && " + 
_quote_cmd(test_config["test_cmd"])
-    subprocess.check_call(["vagrant", "ssh", "-c", f"bash -ec '{test_cmd}'"], 
cwd=release_test_dir)
+    test_cmd_zephyr = (
+        _quote_cmd(["cd", tvm_home]) + " && " + 
_quote_cmd(test_config["test_cmd_zephyr"])
+    )
+    test_cmd_zephyr_aot = (
+        _quote_cmd(["cd", tvm_home]) + " && " + 
_quote_cmd(test_config["test_cmd_zephyr_aot"])
+    )
+    if test_cmd_zephyr:

Review comment:
       that's a good suggestion. I changed it run a single script that has all 
tests and get microtvm-platform as input target.

##########
File path: apps/microtvm/reference-vm/zephyr/base-box/base_box_provision.sh
##########
@@ -0,0 +1,32 @@
+#!/bin/bash -e
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -e
+set -x
+
+source ~/.profile
+
+# Init Zephyr
+cd ~
+~/ubuntu_init_zephyr_project.sh ~/zephyr v2.5-branch --commit 
dabf23758417fd041fec2a2a821d8f526afac29d

Review comment:
       Nothing special about it, this is just to show the most recent RVM build 
is using this commit and has been tested up to this point. I like this better 
because otherwise you have to download the RVM and check the commit.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to