From bf3e1237aa4311d151f4c6c072386b222cff727c Mon Sep 17 00:00:00 2001 From: Lingkai Dong Date: Fri, 14 Aug 2020 17:53:19 +0100 Subject: [PATCH 1/2] Move mbed_functional tests into platform/tests/TESTS --- {TESTS => platform/tests/TESTS}/mbed_functional/callback/main.cpp | 0 .../tests/TESTS}/mbed_functional/callback_big/main.cpp | 0 .../tests/TESTS}/mbed_functional/callback_small/main.cpp | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename {TESTS => platform/tests/TESTS}/mbed_functional/callback/main.cpp (100%) rename {TESTS => platform/tests/TESTS}/mbed_functional/callback_big/main.cpp (100%) rename {TESTS => platform/tests/TESTS}/mbed_functional/callback_small/main.cpp (100%) diff --git a/TESTS/mbed_functional/callback/main.cpp b/platform/tests/TESTS/mbed_functional/callback/main.cpp similarity index 100% rename from TESTS/mbed_functional/callback/main.cpp rename to platform/tests/TESTS/mbed_functional/callback/main.cpp diff --git a/TESTS/mbed_functional/callback_big/main.cpp b/platform/tests/TESTS/mbed_functional/callback_big/main.cpp similarity index 100% rename from TESTS/mbed_functional/callback_big/main.cpp rename to platform/tests/TESTS/mbed_functional/callback_big/main.cpp diff --git a/TESTS/mbed_functional/callback_small/main.cpp b/platform/tests/TESTS/mbed_functional/callback_small/main.cpp similarity index 100% rename from TESTS/mbed_functional/callback_small/main.cpp rename to platform/tests/TESTS/mbed_functional/callback_small/main.cpp From 2f92378642e7bdf4dc657d2d0063f2bf8d7a5362 Mon Sep 17 00:00:00 2001 From: Lingkai Dong Date: Fri, 14 Aug 2020 17:54:47 +0100 Subject: [PATCH 2/2] Move TESTS/usb_device -> drivers/tests/TESTS/usb_device --- {TESTS => drivers/tests/TESTS}/usb_device/README.md | 6 +++--- .../tests/TESTS}/usb_device/basic/USBEndpointTester.cpp | 0 .../tests/TESTS}/usb_device/basic/USBEndpointTester.h | 0 .../tests/TESTS}/usb_device/basic/USBTester.cpp | 0 {TESTS => drivers/tests/TESTS}/usb_device/basic/USBTester.h | 0 {TESTS => drivers/tests/TESTS}/usb_device/basic/main.cpp | 0 .../basic/zadig_conf/mbed_os-usb_test_device1.cfg | 0 .../basic/zadig_conf/mbed_os-usb_test_device2.cfg | 0 {TESTS => drivers/tests/TESTS}/usb_device/hid/main.cpp | 0 .../tests/TESTS}/usb_device/hid/requirements.txt | 0 {TESTS => drivers/tests/TESTS}/usb_device/msd/TestUSBMSD.h | 0 {TESTS => drivers/tests/TESTS}/usb_device/msd/main.cpp | 0 {TESTS => drivers/tests/TESTS}/usb_device/serial/main.cpp | 0 13 files changed, 3 insertions(+), 3 deletions(-) rename {TESTS => drivers/tests/TESTS}/usb_device/README.md (96%) rename {TESTS => drivers/tests/TESTS}/usb_device/basic/USBEndpointTester.cpp (100%) rename {TESTS => drivers/tests/TESTS}/usb_device/basic/USBEndpointTester.h (100%) rename {TESTS => drivers/tests/TESTS}/usb_device/basic/USBTester.cpp (100%) rename {TESTS => drivers/tests/TESTS}/usb_device/basic/USBTester.h (100%) rename {TESTS => drivers/tests/TESTS}/usb_device/basic/main.cpp (100%) rename {TESTS => drivers/tests/TESTS}/usb_device/basic/zadig_conf/mbed_os-usb_test_device1.cfg (100%) rename {TESTS => drivers/tests/TESTS}/usb_device/basic/zadig_conf/mbed_os-usb_test_device2.cfg (100%) rename {TESTS => drivers/tests/TESTS}/usb_device/hid/main.cpp (100%) rename {TESTS => drivers/tests/TESTS}/usb_device/hid/requirements.txt (100%) rename {TESTS => drivers/tests/TESTS}/usb_device/msd/TestUSBMSD.h (100%) rename {TESTS => drivers/tests/TESTS}/usb_device/msd/main.cpp (100%) rename {TESTS => drivers/tests/TESTS}/usb_device/serial/main.cpp (100%) diff --git a/TESTS/usb_device/README.md b/drivers/tests/TESTS/usb_device/README.md similarity index 96% rename from TESTS/usb_device/README.md rename to drivers/tests/TESTS/usb_device/README.md index 38f6bdbeab..04a48f8706 100644 --- a/TESTS/usb_device/README.md +++ b/drivers/tests/TESTS/usb_device/README.md @@ -70,7 +70,7 @@ No setup method has been verified for this platform. 1. Plug both USB interfaces (*DAPLink* and *USB device*) to your host machine. 1. An addtional macro `USB_DEVICE_TESTS` is needed to be defined when runing tests: ``` - mbed test -t -m -DUSB_DEVICE_TESTS -n tests-usb_device-* + mbed test -t -m -DUSB_DEVICE_TESTS -n *-tests-usb_device-* ``` ## Known issues @@ -88,8 +88,8 @@ as an unprivileged user will manifest with either of the following errors: #### Solution Execute tests with elevated permissions using `sudo`: ```bash -mbed test -t -m -n tests-usb_device-* --compile -sudo mbed test -t -m -n tests-usb_device-* --run -v +mbed test -t -m -DUSB_DEVICE_TESTS -n tests-usb_device-* --compile +sudo mbed test -t -m -n *-tests-usb_device-* --run -v ``` Note only the `mbed test --run` command requires `sudo`. You can still `mbed test --compile` as a normal user. diff --git a/TESTS/usb_device/basic/USBEndpointTester.cpp b/drivers/tests/TESTS/usb_device/basic/USBEndpointTester.cpp similarity index 100% rename from TESTS/usb_device/basic/USBEndpointTester.cpp rename to drivers/tests/TESTS/usb_device/basic/USBEndpointTester.cpp diff --git a/TESTS/usb_device/basic/USBEndpointTester.h b/drivers/tests/TESTS/usb_device/basic/USBEndpointTester.h similarity index 100% rename from TESTS/usb_device/basic/USBEndpointTester.h rename to drivers/tests/TESTS/usb_device/basic/USBEndpointTester.h diff --git a/TESTS/usb_device/basic/USBTester.cpp b/drivers/tests/TESTS/usb_device/basic/USBTester.cpp similarity index 100% rename from TESTS/usb_device/basic/USBTester.cpp rename to drivers/tests/TESTS/usb_device/basic/USBTester.cpp diff --git a/TESTS/usb_device/basic/USBTester.h b/drivers/tests/TESTS/usb_device/basic/USBTester.h similarity index 100% rename from TESTS/usb_device/basic/USBTester.h rename to drivers/tests/TESTS/usb_device/basic/USBTester.h diff --git a/TESTS/usb_device/basic/main.cpp b/drivers/tests/TESTS/usb_device/basic/main.cpp similarity index 100% rename from TESTS/usb_device/basic/main.cpp rename to drivers/tests/TESTS/usb_device/basic/main.cpp diff --git a/TESTS/usb_device/basic/zadig_conf/mbed_os-usb_test_device1.cfg b/drivers/tests/TESTS/usb_device/basic/zadig_conf/mbed_os-usb_test_device1.cfg similarity index 100% rename from TESTS/usb_device/basic/zadig_conf/mbed_os-usb_test_device1.cfg rename to drivers/tests/TESTS/usb_device/basic/zadig_conf/mbed_os-usb_test_device1.cfg diff --git a/TESTS/usb_device/basic/zadig_conf/mbed_os-usb_test_device2.cfg b/drivers/tests/TESTS/usb_device/basic/zadig_conf/mbed_os-usb_test_device2.cfg similarity index 100% rename from TESTS/usb_device/basic/zadig_conf/mbed_os-usb_test_device2.cfg rename to drivers/tests/TESTS/usb_device/basic/zadig_conf/mbed_os-usb_test_device2.cfg diff --git a/TESTS/usb_device/hid/main.cpp b/drivers/tests/TESTS/usb_device/hid/main.cpp similarity index 100% rename from TESTS/usb_device/hid/main.cpp rename to drivers/tests/TESTS/usb_device/hid/main.cpp diff --git a/TESTS/usb_device/hid/requirements.txt b/drivers/tests/TESTS/usb_device/hid/requirements.txt similarity index 100% rename from TESTS/usb_device/hid/requirements.txt rename to drivers/tests/TESTS/usb_device/hid/requirements.txt diff --git a/TESTS/usb_device/msd/TestUSBMSD.h b/drivers/tests/TESTS/usb_device/msd/TestUSBMSD.h similarity index 100% rename from TESTS/usb_device/msd/TestUSBMSD.h rename to drivers/tests/TESTS/usb_device/msd/TestUSBMSD.h diff --git a/TESTS/usb_device/msd/main.cpp b/drivers/tests/TESTS/usb_device/msd/main.cpp similarity index 100% rename from TESTS/usb_device/msd/main.cpp rename to drivers/tests/TESTS/usb_device/msd/main.cpp diff --git a/TESTS/usb_device/serial/main.cpp b/drivers/tests/TESTS/usb_device/serial/main.cpp similarity index 100% rename from TESTS/usb_device/serial/main.cpp rename to drivers/tests/TESTS/usb_device/serial/main.cpp