Commit 8162ec18 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner

migrator: Simple system test

Run the migrator (in a batch mode) and check the produced config.
parent 14359501
......@@ -11,6 +11,9 @@ UPD_SYS_TESTS := \
steal-confs \
simple-update
MIGRATE_SYS_TESTS := \
auto-migrate-pkgs
.PHONY: test-sys valgrind-sys check
check: test-sys valgrind-sys
......@@ -31,3 +34,4 @@ endef
$(eval $(foreach TEST,$(TRANS_SYS_TESTS),$(call DO_SYS_TEST,opkg-trans,$(TEST))))
$(eval $(foreach TEST,$(UPD_SYS_TESTS),$(call DO_SYS_TEST,pkgupdate,$(TEST))))
$(eval $(foreach TEST,$(MIGRATE_SYS_TESTS),$(call DO_SYS_TEST,pkgmigrate,$(TEST))))
rm "$ROOT_DIR"/config
rm -r "$ROOT_DIR"/repo
Repository "test" "file://%ROOT_DIR%/repo"
Install "test-package"
#!/bin/sh
echo "Test script installed"
Package: extra-pkg
Version: 1
Source: package/test
License: GPL-2.0
Section: none
Architecture: all
Installed-Size: 24000
Description: Test package. Nothing special here.
Package: test-package
Version: 1
Source: package/test
License: GPL-2.0
Section: none
Architecture: all
Installed-Size: 24000
Description: Test package. Nothing special here.
f299060e0383392ebeac64b714eca7e3 /etc/test
94addd51a7efec8c4d9203f5c14d9471 /usr/bin/test.sh
b8f6d3ba5e12aae70a72ac5dff61f039 /usr/share/test/package-test
/usr/bin/test.sh
/usr/share/test/package-test
/etc/test
Package: test-package
Version: 1
Status: install user installed
Architecture: all
Conffiles:
/etc/test 37d2046a395cbfcb2712ff5c96a727b1966876080047c56717009dbbc235f566
Installed-Time: 1471445715
Package: extra-pkg
Version: 1
Status: install user installed
Architecture: all
Installed-Time: 1471445715
-- Auto-migration performed (do not delete this line, or it may attempt doing so again)
Install "extra-pkg"
#!/bin/sh
echo "Test script installed"
Package: extra-pkg
Version: 1
Source: package/test
License: GPL-2.0
Section: none
Architecture: all
Installed-Size: 24000
Description: Test package. Nothing special here.
Package: test-package
Version: 1
Source: package/test
License: GPL-2.0
Section: none
Architecture: all
Installed-Size: 24000
Description: Test package. Nothing special here.
f299060e0383392ebeac64b714eca7e3 /etc/test
94addd51a7efec8c4d9203f5c14d9471 /usr/bin/test.sh
b8f6d3ba5e12aae70a72ac5dff61f039 /usr/share/test/package-test
/usr/bin/test.sh
/usr/share/test/package-test
/etc/test
Package: test-package
Version: 1
Status: install user installed
Architecture: all
Conffiles:
/etc/test 37d2046a395cbfcb2712ff5c96a727b1966876080047c56717009dbbc235f566
Installed-Time: 1471445715
Package: extra-pkg
Version: 1
Status: install user installed
Architecture: all
Installed-Time: 1471445715
"file://$ROOT_DIR/config" --batch -R "$ROOT_DIR" --output "$ROOT_DIR/config.lua"
sed -i -e "s#%ROOT_DIR%#$ROOT_DIR#" $ROOT_DIR/config
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment