diff options
author | kh1 <karsten.heimrich@nokia.com> | 2012-03-12 16:51:41 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@nokia.com> | 2012-03-13 11:43:41 +0100 |
commit | 342f67fa85df0fbd60f7ea8947d6cfbf4692fe63 (patch) | |
tree | d689f011a386f6629a41cf459f831aaee4057c37 | |
parent | 6559f16ee3a5f7d56048d14c5c25ddfaa4c6df83 (diff) |
Move everything releated to testing into tests.
Change-Id: I28fc488b3de03a8561888969336f2ebc62a97bb0
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
-rw-r--r-- | installerbuilder/create-test-installer.bat | 70 | ||||
-rw-r--r-- | installerbuilder/create-test-installer.sh | 1 | ||||
-rw-r--r-- | installerbuilder/installerbuilder.pro | 12 | ||||
-rw-r--r-- | installerbuilder/tests/tests.pro | 11 | ||||
-rw-r--r-- | installerfw.pro | 10 | ||||
-rw-r--r-- | tests/environmentvariable/environmentvariable.pro (renamed from installerbuilder/tests/environmentvariable/environmentvariable.pro) | 8 | ||||
-rw-r--r-- | tests/environmentvariable/environmentvariabletest.cpp (renamed from installerbuilder/tests/environmentvariable/environmentvariabletest.cpp) | 0 | ||||
-rw-r--r-- | tests/environmentvariable/environmentvariabletest.h (renamed from installerbuilder/tests/environmentvariable/environmentvariabletest.h) | 0 | ||||
-rw-r--r-- | tests/extractarchiveoperationtest/extractarchiveoperationtest.cpp (renamed from installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.cpp) | 0 | ||||
-rw-r--r-- | tests/extractarchiveoperationtest/extractarchiveoperationtest.h (renamed from installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.h) | 0 | ||||
-rw-r--r-- | tests/extractarchiveoperationtest/extractarchiveoperationtest.pro (renamed from installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.pro) | 7 | ||||
-rw-r--r-- | tests/fileengineclient/fileengineclient.cpp (renamed from tools/fileengineclient/fileengineclient.cpp) | 0 | ||||
-rw-r--r-- | tests/fileengineclient/fileengineclient.pro (renamed from tools/fileengineclient/fileengineclient.pro) | 0 | ||||
-rw-r--r-- | tests/fileengineserver/fileengineserver.cpp (renamed from tools/fileengineserver/fileengineserver.cpp) | 0 | ||||
-rw-r--r-- | tests/fileengineserver/fileengineserver.pro (renamed from tools/fileengineserver/fileengineserver.pro) | 0 | ||||
-rw-r--r-- | tests/test-installer/BatchSubstitute.bat (renamed from installerbuilder/BatchSubstitute.bat) | 0 | ||||
-rw-r--r-- | tests/test-installer/auto_installations_script.qs (renamed from installerbuilder/auto_installations_script.qs) | 0 | ||||
-rw-r--r-- | tests/test-installer/create-test-installer.bat | 76 | ||||
-rw-r--r-- | tests/test-installer/create-test-installer.sh | 1 | ||||
-rw-r--r-- | tests/test-noarchive.7z (renamed from installerbuilder/tests/test-noarchive.7z) | 0 | ||||
-rw-r--r-- | tests/test1.7z (renamed from installerbuilder/tests/test1.7z) | bin | 282 -> 282 bytes | |||
-rw-r--r-- | tests/test2.7z (renamed from installerbuilder/tests/test2.7z) | bin | 629 -> 629 bytes | |||
-rw-r--r-- | tests/tests.pro | 7 | ||||
-rw-r--r-- | tools/tools.pro | 7 |
24 files changed, 105 insertions, 105 deletions
diff --git a/installerbuilder/create-test-installer.bat b/installerbuilder/create-test-installer.bat deleted file mode 100644 index 146779997..000000000 --- a/installerbuilder/create-test-installer.bat +++ /dev/null @@ -1,70 +0,0 @@ -IF "%1" EQU "" ( - set OFFLINE_INSTALLER=true - set ONLINE_INSTALLER=true - set REPOGEN=true - set TEST_ONLINE_INSTALLER=false - set TEST_OFFLINE_INSTALLER=false -) else ( - set OFFLINE_INSTALLER=false - set ONLINE_INSTALLER=false - set REPOGEN=false - set TEST_ONLINE_INSTALLER=false - set TEST_OFFLINE_INSTALLER=false -) - -for %%i in (%1,%2,%3,%4,%5,%6,%7,%8,%9) DO ( - IF "%%i" EQU "offline" ( - set OFFLINE_INSTALLER=true - ) - IF "%%i" EQU "online" ( - set ONLINE_INSTALLER=true - ) - IF "%%i" EQU "repogen" ( - set REPOGEN=true - ) - IF "%%i" EQU "test_online" ( - set TEST_ONLINE_INSTALLER=true - ) - IF "%%i" EQU "test_offline" ( - set TEST_OFFLINE_INSTALLER=true - ) -) - -set AUTO_INSTALLATION_SCRIPT=--script %CD%\auto_installations_script.qs - -set LOCAL_REPOSITORY_PATH=file:///%CD%\bin\repository -set LOCAL_REPOSITORY_PATH=%LOCAL_REPOSITORY_PATH:\=/% - -call BatchSubstitute.bat http://www.xxxx.com/repository %LOCAL_REPOSITORY_PATH% ..\examples\testapp\config\config.xml > ..\examples\testapp\config\config.xml_new - -copy /Y ..\examples\testapp\config\config.xml ..\examples\testapp\config\config.xml_old -move /Y ..\examples\testapp\config\config.xml_new ..\examples\testapp\config\config.xml - -IF "%OFFLINE_INSTALLER%" EQU "true" ( - echo create offline installer - bin\binarycreator -t bin\installerbase.exe -v -p ..\examples\testapp\packages -c ..\examples\testapp\config --offline-only bin\test-installer-offline.exe com.nokia.testapp - IF errorlevel 1 pause ELSE echo ...done -) - -IF "%ONLINE_INSTALLER%" EQU "true" ( - echo create online installer - bin\binarycreator -t bin\installerbase.exe -v -n -p ..\examples\testapp\packages -c ..\examples\testapp\config bin\test-installer-online.exe com.nokia.testapp - IF errorlevel 1 pause ELSE echo ...done -) - -IF "%REPOGEN%" EQU "true" ( - echo create online repository - IF exist bin\repository rmdir /S /Q bin\repository - bin\repogen.exe -p ..\examples\testapp\packages -c ..\examples\testapp\config bin\repository com.nokia.testapp - IF errorlevel 1 pause ELSE echo ...done -) - -IF "%TEST_OFFLINE_INSTALLER%" EQU "true" ( - bin\test-installer-offline.exe --verbose %AUTO_INSTALLATION_SCRIPT% -) - -IF "%TEST_ONLINE_INSTALLER%" EQU "true" ( - bin\test-installer-online.exe --verbose %AUTO_INSTALLATION_SCRIPT% -) - -copy /Y ..\examples\testapp\config\config.xml_old ..\examples\testapp\config\config.xml diff --git a/installerbuilder/create-test-installer.sh b/installerbuilder/create-test-installer.sh deleted file mode 100644 index abf25b63d..000000000 --- a/installerbuilder/create-test-installer.sh +++ /dev/null @@ -1 +0,0 @@ -./bin/binarycreator -t bin/installerbase -v -p ../examples/testapp/packages -c ../examples/testapp/config test-installer --offline-only com.nokia.testapp diff --git a/installerbuilder/installerbuilder.pro b/installerbuilder/installerbuilder.pro index c1621c68d..c057eb265 100644 --- a/installerbuilder/installerbuilder.pro +++ b/installerbuilder/installerbuilder.pro @@ -1,12 +1,4 @@ TEMPLATE = subdirs CONFIG += ordered -SUBDIRS += libinstaller installerbase binarycreator repogen archivegen tests - -test.commands=(cd tests && $(MAKE) test) - -test.target=test -test.depends = $(TARGET) -QMAKE_EXTRA_TARGETS += test - -TRANSLATIONS += installerbase/translations/de_de.ts \ - installerbase/translations/en_us.ts +SUBDIRS += libinstaller installerbase binarycreator repogen archivegen +TRANSLATIONS += installerbase/translations/de_de.ts installerbase/translations/en_us.ts diff --git a/installerbuilder/tests/tests.pro b/installerbuilder/tests/tests.pro deleted file mode 100644 index 4cb064c52..000000000 --- a/installerbuilder/tests/tests.pro +++ /dev/null @@ -1,11 +0,0 @@ -TEMPLATE=subdirs - -DESTDIR = bin -SUBDIRS += extractarchiveoperationtest environmentvariable - -unix:test.commands=./bin/extractarchiveoperationtest -win32:test.commands=bin\\extractarchiveoperationtest.exe - -test.target=test -test.depends = $(TARGET) -QMAKE_EXTRA_TARGETS += test diff --git a/installerfw.pro b/installerfw.pro index 7d3a262a6..a092158bc 100644 --- a/installerfw.pro +++ b/installerfw.pro @@ -1,11 +1,11 @@ -TEMPLATE=subdirs CONFIG += ordered -SUBDIRS += installerbuilder examples tools -mac:SUBDIRS -= examples +TEMPLATE = subdirs +!macx:SUBDIRS += examples +SUBDIRS += installerbuilder tools -test.target=test -test.commands=(cd installerbuilder && $(MAKE) test) +test.target = test test.depends = $(TARGET) QMAKE_EXTRA_TARGETS += test +test.commands = (cd tests && $(QMAKE) && $(MAKE)) include (doc/doc.pri) diff --git a/installerbuilder/tests/environmentvariable/environmentvariable.pro b/tests/environmentvariable/environmentvariable.pro index 704cf8ff6..036a4ff02 100644 --- a/installerbuilder/tests/environmentvariable/environmentvariable.pro +++ b/tests/environmentvariable/environmentvariable.pro @@ -8,13 +8,15 @@ CONFIG -= app_bundle QT += testlib script QT -= gui -INCLUDEPATH += ../../libinstaller .. -DEPENDPATH += ../../libinstaller ../../common +INCLUDEPATH += ../../installerbuilder/libinstaller .. +DEPENDPATH += ../../installerbuilder/libinstaller ../../installerbuilder/common -include(../../libinstaller/libinstaller.pri) +include(../../installerbuilder/libinstaller/libinstaller.pri) SOURCES = environmentvariabletest.cpp HEADERS = environmentvariabletest.h +LIBS = -L../../installerbuilder/lib -linstaller $$LIBS win32:LIBS += ole32.lib oleaut32.lib user32.lib win32:OBJECTS_DIR = .obj + diff --git a/installerbuilder/tests/environmentvariable/environmentvariabletest.cpp b/tests/environmentvariable/environmentvariabletest.cpp index b3088cfb2..b3088cfb2 100644 --- a/installerbuilder/tests/environmentvariable/environmentvariabletest.cpp +++ b/tests/environmentvariable/environmentvariabletest.cpp diff --git a/installerbuilder/tests/environmentvariable/environmentvariabletest.h b/tests/environmentvariable/environmentvariabletest.h index 1a9fb5e45..1a9fb5e45 100644 --- a/installerbuilder/tests/environmentvariable/environmentvariabletest.h +++ b/tests/environmentvariable/environmentvariabletest.h diff --git a/installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.cpp b/tests/extractarchiveoperationtest/extractarchiveoperationtest.cpp index e898f919b..e898f919b 100644 --- a/installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.cpp +++ b/tests/extractarchiveoperationtest/extractarchiveoperationtest.cpp diff --git a/installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.h b/tests/extractarchiveoperationtest/extractarchiveoperationtest.h index 5ace60e70..5ace60e70 100644 --- a/installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.h +++ b/tests/extractarchiveoperationtest/extractarchiveoperationtest.h diff --git a/installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.pro b/tests/extractarchiveoperationtest/extractarchiveoperationtest.pro index 11ccc3474..ce3551e1d 100644 --- a/installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.pro +++ b/tests/extractarchiveoperationtest/extractarchiveoperationtest.pro @@ -8,13 +8,14 @@ CONFIG -= app_bundle QT += testlib script QT -= gui -INCLUDEPATH += ../../libinstaller .. -DEPENDPATH += ../../libinstaller ../../common +INCLUDEPATH += ../../installerbuilder/libinstaller .. +DEPENDPATH += ../../installerbuilder/libinstaller ../../installerbuilder/common -include(../../libinstaller/libinstaller.pri) +include(../../installerbuilder/libinstaller/libinstaller.pri) SOURCES = extractarchiveoperationtest.cpp HEADERS = extractarchiveoperationtest.h +LIBS = -L../../installerbuilder/lib -linstaller $$LIBS win32:LIBS += ole32.lib oleaut32.lib user32.lib win32:OBJECTS_DIR = .obj diff --git a/tools/fileengineclient/fileengineclient.cpp b/tests/fileengineclient/fileengineclient.cpp index 33f8fff53..33f8fff53 100644 --- a/tools/fileengineclient/fileengineclient.cpp +++ b/tests/fileengineclient/fileengineclient.cpp diff --git a/tools/fileengineclient/fileengineclient.pro b/tests/fileengineclient/fileengineclient.pro index 8946813ae..8946813ae 100644 --- a/tools/fileengineclient/fileengineclient.pro +++ b/tests/fileengineclient/fileengineclient.pro diff --git a/tools/fileengineserver/fileengineserver.cpp b/tests/fileengineserver/fileengineserver.cpp index a1e2d121c..a1e2d121c 100644 --- a/tools/fileengineserver/fileengineserver.cpp +++ b/tests/fileengineserver/fileengineserver.cpp diff --git a/tools/fileengineserver/fileengineserver.pro b/tests/fileengineserver/fileengineserver.pro index 89cd0ffc9..89cd0ffc9 100644 --- a/tools/fileengineserver/fileengineserver.pro +++ b/tests/fileengineserver/fileengineserver.pro diff --git a/installerbuilder/BatchSubstitute.bat b/tests/test-installer/BatchSubstitute.bat index 99bffdcb0..99bffdcb0 100644 --- a/installerbuilder/BatchSubstitute.bat +++ b/tests/test-installer/BatchSubstitute.bat diff --git a/installerbuilder/auto_installations_script.qs b/tests/test-installer/auto_installations_script.qs index 35960c3b5..35960c3b5 100644 --- a/installerbuilder/auto_installations_script.qs +++ b/tests/test-installer/auto_installations_script.qs diff --git a/tests/test-installer/create-test-installer.bat b/tests/test-installer/create-test-installer.bat new file mode 100644 index 000000000..866e41f4c --- /dev/null +++ b/tests/test-installer/create-test-installer.bat @@ -0,0 +1,76 @@ +IF "%1" EQU "" ( + set OFFLINE_INSTALLER=true + set ONLINE_INSTALLER=true + set REPOGEN=true + set TEST_ONLINE_INSTALLER=false + set TEST_OFFLINE_INSTALLER=false +) else ( + set OFFLINE_INSTALLER=false + set ONLINE_INSTALLER=false + set REPOGEN=false + set TEST_ONLINE_INSTALLER=false + set TEST_OFFLINE_INSTALLER=false +) + +for %%i in (%1,%2,%3,%4,%5,%6,%7,%8,%9) DO ( + IF "%%i" EQU "offline" ( + set OFFLINE_INSTALLER=true + ) + IF "%%i" EQU "online" ( + set ONLINE_INSTALLER=true + ) + IF "%%i" EQU "repogen" ( + set REPOGEN=true + ) + IF "%%i" EQU "test_online" ( + set TEST_ONLINE_INSTALLER=true + ) + IF "%%i" EQU "test_offline" ( + set TEST_OFFLINE_INSTALLER=true + ) +) + +set AUTO_INSTALLATION_SCRIPT=--script %CD%\auto_installations_script.qs + +set BINARY_PATH_RELATIVE=%CD%\..\..\installerbuilder\bin +pushd . +cd %BINARY_PATH_RELATIVE% +set BINARY_PATH_ABSOLUTE=%CD% +popd + +set LOCAL_REPOSITORY=file:///%BINARY_PATH_ABSOLUTE%/repository +set LOCAL_REPOSITORY_PATH=%LOCAL_REPOSITORY:\=/% + +call BatchSubstitute.bat http://www.xxxx.com/repository %LOCAL_REPOSITORY_PATH% ..\..\examples\testapp\config\config.xml > ..\..\examples\testapp\config\config.xml_new + +copy /Y ..\..\examples\testapp\config\config.xml ..\..\examples\testapp\config\config.xml_old +move /Y ..\..\examples\testapp\config\config.xml_new ..\..\examples\testapp\config\config.xml + +IF "%OFFLINE_INSTALLER%" EQU "true" ( + echo create offline installer + ..\..\installerbuilder\bin\binarycreator -t ..\..\installerbuilder\bin\installerbase.exe -v -p ..\..\examples\testapp\packages -c ..\..\examples\testapp\config --offline-only ..\..\installerbuilder\bin\test-installer-offline.exe com.nokia.testapp + IF errorlevel 1 pause ELSE echo ...done +) + +IF "%ONLINE_INSTALLER%" EQU "true" ( + echo create online installer + ..\..\installerbuilder\bin\binarycreator -t ..\..\installerbuilder\bin\installerbase.exe -v -n -p ..\..\examples\testapp\packages -c ..\..\examples\testapp\config ..\..\installerbuilder\bin\test-installer-online.exe com.nokia.testapp + IF errorlevel 1 pause ELSE echo ...done +) + +IF "%REPOGEN%" EQU "true" ( + echo create online repository + IF exist ..\..\installerbuilder\bin\repository rmdir /S /Q ..\..\installerbuilder\bin\repository + ..\..\installerbuilder\bin\repogen.exe -p ..\..\examples\testapp\packages -c ..\..\examples\testapp\config ..\..\installerbuilder\bin\repository com.nokia.testapp + IF errorlevel 1 pause ELSE echo ...done +) + +IF "%TEST_OFFLINE_INSTALLER%" EQU "true" ( + ..\..\installerbuilder\bin\test-installer-offline.exe --verbose %AUTO_INSTALLATION_SCRIPT% +) + +IF "%TEST_ONLINE_INSTALLER%" EQU "true" ( + ..\..\installerbuilder\bin\test-installer-online.exe --verbose %AUTO_INSTALLATION_SCRIPT% +) + +copy /Y ..\..\examples\testapp\config\config.xml_old ..\..\examples\testapp\config\config.xml diff --git a/tests/test-installer/create-test-installer.sh b/tests/test-installer/create-test-installer.sh new file mode 100644 index 000000000..21889d50d --- /dev/null +++ b/tests/test-installer/create-test-installer.sh @@ -0,0 +1 @@ +../../installerbuilder/bin/binarycreator -t ../../installerbuilder/bin/installerbase -v -p ../../examples/testapp/packages -c ../../examples/testapp/config test-installer --offline-only com.nokia.testapp diff --git a/installerbuilder/tests/test-noarchive.7z b/tests/test-noarchive.7z index 963107aca..963107aca 100644 --- a/installerbuilder/tests/test-noarchive.7z +++ b/tests/test-noarchive.7z diff --git a/installerbuilder/tests/test1.7z b/tests/test1.7z Binary files differindex 38a4c53ac..38a4c53ac 100644 --- a/installerbuilder/tests/test1.7z +++ b/tests/test1.7z diff --git a/installerbuilder/tests/test2.7z b/tests/test2.7z Binary files differindex 99d199695..99d199695 100644 --- a/installerbuilder/tests/test2.7z +++ b/tests/test2.7z diff --git a/tests/tests.pro b/tests/tests.pro new file mode 100644 index 000000000..f8eb9fc8b --- /dev/null +++ b/tests/tests.pro @@ -0,0 +1,7 @@ +TEMPLATE = subdirs + +DESTDIR = bin +SUBDIRS += extractarchiveoperationtest environmentvariable fileengineclient fileengineserver + +unix:test.commands = ./bin/extractarchiveoperationtest +win32:test.commands = bin\\extractarchiveoperationtest.exe diff --git a/tools/tools.pro b/tools/tools.pro index 1b7b31eef..4ec49ab01 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -1,5 +1,8 @@ -TEMPLATE=subdirs CONFIG += ordered -SUBDIRS += fileengineclient fileengineserver extractbinarydata +TEMPLATE = subdirs +SUBDIRS += extractbinarydata \ + maddehelper \ + repocompare \ + repogenfromonlinerepo |