test-raw: Run tests and shutdown automatically
* Move running the tests to user bootscript. * Remove SSH preconfiguration from first_login. * Add debug_server settings. * Disable more flaky tests. * Fix libsupportkit_RemoteTestObject.so build. Change-Id: I774ab4fc5a007da463cf1213d92132ad9f64fe7f Reviewed-on: https://review.haiku-os.org/c/haiku/+/10708 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Kacper Kasper <[email protected]>
This commit is contained in:
@@ -17,6 +17,8 @@ rule UnitTestLib
|
||||
local local_libraries = $(4) ;
|
||||
local rdefs = $(5) ;
|
||||
|
||||
AddResources $(lib) : $(rdefs) ;
|
||||
|
||||
# if TEST_DEBUG is defined, we turn on debugging
|
||||
if $(TEST_DEBUG) {
|
||||
DEBUG on $(lib) [ FGristFiles $(sources:S=$(SUFOBJ)) ] ?= 1 ;
|
||||
@@ -36,7 +38,7 @@ rule UnitTestLib
|
||||
UseCppUnitObjectHeaders $(sources) ;
|
||||
|
||||
MakeLocate $(lib) : $(TARGET_UNIT_TEST_LIB_DIR) ;
|
||||
SharedLibrary $(lib) : $(sources) : $(libraries) $(local_libraries) libcppunit.so : $(rdefs) ;
|
||||
SharedLibrary $(lib) : $(sources) : $(libraries) $(local_libraries) libcppunit.so ;
|
||||
|
||||
UnitTestDependency $(lib) ;
|
||||
UNIT_TEST_LIBRARIES on unittests += $(lib) ;
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
# import everything from the minimum image
|
||||
include [ FDirName $(HAIKU_BUILD_RULES_DIR) images definitions minimum ] ;
|
||||
|
||||
local runTestsBootscript = TestsBootscript ;
|
||||
SEARCH on $(runTestsBootscript) = [ FDirName $(HAIKU_TOP) src tests ] ;
|
||||
AddFilesToHaikuImage home config settings boot launch : $(runTestsBootscript) ;
|
||||
|
||||
local debugServerSettings = debug_server_settings ;
|
||||
SEARCH on $(debugServerSettings) = [ FDirName $(HAIKU_TOP) src tests ] ;
|
||||
AddFilesToHaikuImage home config settings system debug_server : $(debugServerSettings) : settings ;
|
||||
|
||||
SYSTEM_APPS = [ FFilterByBuildFeatures
|
||||
Debugger@libedit
|
||||
NetworkStatus
|
||||
|
||||
@@ -266,9 +266,6 @@ AddFilesToPackage data user_launch : $(userLaunchScripts) ;
|
||||
|
||||
# first login scripts
|
||||
local firstLoginFiles = default_deskbar_items.sh ;
|
||||
if $(HAIKU_BUILD_TYPE) = test {
|
||||
firstLoginFiles += test_image.sh ;
|
||||
}
|
||||
firstLoginFiles = $(firstLoginFiles:G=first-login) ;
|
||||
SEARCH on $(firstLoginFiles)
|
||||
= [ FDirName $(HAIKU_TOP) data system boot first_login ] ;
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
sshd_config_path=/system/settings/ssh/sshd_config
|
||||
/bin/sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/;' $sshd_config_path
|
||||
/bin/sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/;' $sshd_config_path
|
||||
/bin/sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords yes/' $sshd_config_path
|
||||
/bin/passwd -d user
|
||||
/bin/sshd -D & # sshd fails to start on first boot
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
volumeName="qemu vvfat"
|
||||
|
||||
/bin/mountvolume -alldos
|
||||
cp -r /system/add-ons/unittests /boot/home
|
||||
(cd /boot/home/unittests && UnitTester) > /"$volumeName"/test_result.txt 2>&1
|
||||
|
||||
sleep 5 # in case there is a crash and report has to be written
|
||||
cp /boot/home/Desktop/*.report /"$volumeName"/
|
||||
|
||||
sync
|
||||
sleep 5
|
||||
|
||||
shutdown
|
||||
@@ -0,0 +1 @@
|
||||
default_action log
|
||||
@@ -19,7 +19,7 @@ BTestSuite* getTestSuite2() {
|
||||
BTestSuite *suite = new BTestSuite("App");
|
||||
|
||||
// ##### Add test suites here #####
|
||||
suite->addTest("BApplication", ApplicationTestSuite());
|
||||
// suite->addTest("BApplication", ApplicationTestSuite());
|
||||
suite->addTest("BClipboard", ClipboardTestSuite());
|
||||
// suite->addTest("BCursor", CursorTestSuite());
|
||||
suite->addTest("BHandler", HandlerTestSuite());
|
||||
@@ -29,7 +29,7 @@ BTestSuite* getTestSuite2() {
|
||||
suite->addTest("BMessageRunner", MessageRunnerTestSuite());
|
||||
suite->addTest("BMessenger", MessengerTestSuite());
|
||||
suite->addTest("BPropertyInfo", PropertyInfoTestSuite());
|
||||
suite->addTest("BRoster", RosterTestSuite());
|
||||
// suite->addTest("BRoster", RosterTestSuite());
|
||||
// TODO: calls Lock on destruction, hangs
|
||||
//suite->addTest("RegistrarThreadManager", RegistrarThreadManagerTest::Suite());
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ rule CopyBAppTestApp
|
||||
MimeSet $(target) ;
|
||||
|
||||
UnitTestDependency $(target) ;
|
||||
UNIT_TEST_EXECUTABLES on unittests += $(target) ;
|
||||
}
|
||||
|
||||
# BApplication::BApplication() test apps
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
|
||||
BTestSuite* getTestSuite() {
|
||||
BTestSuite *suite = new BTestSuite("Translation");
|
||||
suite->addTest("TranslatorRosterTest", TranslatorRosterTest::Suite());
|
||||
suite->addTest("BitmapStreamTest", BitmapStreamTest::Suite());
|
||||
// suite->addTest("TranslatorRosterTest", TranslatorRosterTest::Suite());
|
||||
// suite->addTest("BitmapStreamTest", BitmapStreamTest::Suite());
|
||||
suite->addTest("TranslationUtilsTest", TranslationUtilsTest::Suite());
|
||||
suite->addTest("TranslatorTest", TranslatorTest::Suite());
|
||||
return suite;
|
||||
|
||||
Reference in New Issue
Block a user