summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2013-06-17 21:57:45 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2013-07-01 16:50:46 +0000
commit4fb1c1b0e8ca8510c76d849e3b330c52934bca16 (patch)
tree047314f32e725fc347b211df3e009a3b024951c2
parentaac14e2efc8d427760f29ca8878552e9cb509536 (diff)
downloadtbdiff-4fb1c1b0e8ca8510c76d849e3b330c52934bca16.tar.gz
Remove test mode and provide hooks to use a test suite.
Tests will now be handled by a test suite in a future commit, so this mode will not be needed anymore. The test suite will work by replacing the mounting script by a fake mounting script that points to a directory with a systems folder. Also add trap again, now that it is more tested.
-rwxr-xr-xbaserock-system-config-sync/baserock-system-config-sync32
l---------baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1/sl11
l---------baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1/sl21
l---------baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1/sl31
l---------baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2/sl11
l---------baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2/sl31
l---------baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2/sl41
l---------baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vu/sl11
l---------baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vu/sl21
l---------baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vu/sl41
l---------tests/bscs-merge.fail/dir.symb.in/systems/default1
l---------tests/bscs-merge.fail/dir.symb.in/systems/factory/orig/etc/1 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.dir.symb/vu/1)0
-rw-r--r--tests/bscs-merge.fail/dir.symb.in/systems/factory/orig/etc/afile (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.dir.symb/vu/afile)0
l---------tests/bscs-merge.fail/dir.symb.in/systems/factory/run/etc/1 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.symb/vu/1)0
-rw-r--r--tests/bscs-merge.fail/dir.symb.in/systems/factory/run/etc/afile (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.symb/vu/afile)0
-rw-r--r--tests/bscs-merge.fail/dir.symb.in/systems/version2/orig/etc/1/gitdoesnotlikemptydirs (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.dir/v1/1)0
-rw-r--r--tests/bscs-merge.fail/dir.symb.in/systems/version2/run/etc/1/gitdoesnotlikemptydirs (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.dir/v2/1)0
l---------tests/bscs-merge.fail/regular.dir.in/systems/default1
-rw-r--r--tests/bscs-merge.fail/regular.dir.in/systems/factory/orig/etc/1 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.symb/v1/1)0
-rw-r--r--tests/bscs-merge.fail/regular.dir.in/systems/factory/run/etc/1 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.symb/v2/1)0
-rw-r--r--tests/bscs-merge.fail/regular.dir.in/systems/version2/orig/etc/1/gitdoesnotlikemptydirs (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1f)0
-rw-r--r--tests/bscs-merge.fail/regular.dir.in/systems/version2/run/etc/1/gitdoesnotlikemptydirs (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2f)0
l---------tests/bscs-merge.fail/regular.symb.in/systems/default1
-rw-r--r--tests/bscs-merge.fail/regular.symb.in/systems/factory/orig/etc/1 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vuf)0
l---------tests/bscs-merge.fail/regular.symb.in/systems/factory/run/etc/11
-rw-r--r--tests/bscs-merge.fail/regular.symb.in/systems/factory/run/etc/afile (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/subdir1/subsubdir2/subsubfile4)0
-rw-r--r--tests/bscs-merge.fail/regular.symb.in/systems/version2/orig/etc/1 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/subdir1/subsubdir2/subsubfile4)0
-rw-r--r--tests/bscs-merge.fail/regular.symb.in/systems/version2/run/etc/10
l---------tests/bscs-merge.pass/empty.in/systems/default1
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1v2-11
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1v2-21
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1vu-11
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1vu-20
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1vuv2-11
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/factory/run/etc/v1vu-10
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/factory/run/etc/v1vu-21
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/factory/run/etc/v1vuv2-11
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/factory/run/etc/vuv2-10
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/factory/run/etc/vuv2-21
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/v1v2-11
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/v1v2-20
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/v1vuv2-11
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/vuv2-11
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/vuv2-20
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/version2/run/etc/v1v2-11
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/version2/run/etc/v1v2-20
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/version2/run/etc/v1vuv2-11
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/version2/run/etc/vuv2-11
-rw-r--r--tests/bscs-merge.pass/empty.in/systems/version2/run/etc/vuv2-20
l---------tests/bscs-merge.pass/empty.out/systems/default1
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1v2-11
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1v2-21
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1vu-11
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1vu-20
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1vuv2-11
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/factory/run/etc/v1vu-10
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/factory/run/etc/v1vu-21
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/factory/run/etc/v1vuv2-11
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/factory/run/etc/vuv2-10
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/factory/run/etc/vuv2-21
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/v1v2-11
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/v1v2-20
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/v1vuv2-11
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/vuv2-11
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/vuv2-20
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1v2-11
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1v2-20
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1vu-10
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1vu-21
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1vuv2-11
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/version2/run/etc/vuv2-10
-rw-r--r--tests/bscs-merge.pass/empty.out/systems/version2/run/etc/vuv2-21
l---------tests/bscs-merge.pass/sshconf.in/systems/default1
-rw-r--r--tests/bscs-merge.pass/sshconf.in/systems/factory/orig/etc/sshd_config (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.etc/v1/sshd_config)0
-rw-r--r--tests/bscs-merge.pass/sshconf.in/systems/factory/run/etc/sshd_config (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.etc/vu/sshd_config)0
-rw-r--r--tests/bscs-merge.pass/sshconf.in/systems/version2/orig/etc/sshd_config (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades.etc/v2/sshd_config)0
-rw-r--r--tests/bscs-merge.pass/sshconf.in/systems/version2/run/etc/sshd_config123
l---------tests/bscs-merge.pass/sshconf.out/systems/default1
-rw-r--r--tests/bscs-merge.pass/sshconf.out/systems/factory/orig/etc/sshd_config123
-rw-r--r--tests/bscs-merge.pass/sshconf.out/systems/factory/run/etc/sshd_config123
-rw-r--r--tests/bscs-merge.pass/sshconf.out/systems/version2/orig/etc/sshd_config123
-rw-r--r--tests/bscs-merge.pass/sshconf.out/systems/version2/run/etc/sshd_config123
l---------tests/bscs-merge.pass/symblinks.in/systems/default1
l---------tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v11
l---------tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1v21
l---------tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1vu1
l---------tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1vuv21
l---------tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/v1vu1
l---------tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/v1vuv21
l---------tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/vu1
l---------tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/vuv21
l---------tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/v1v21
l---------tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/v1vuv21
l---------tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/v21
l---------tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/vuv21
l---------tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/v1v21
l---------tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/v1vuv21
l---------tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/v21
l---------tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/vuv21
-rw-r--r--tests/bscs-merge.pass/symblinks.in/v11
-rw-r--r--tests/bscs-merge.pass/symblinks.in/v21
-rw-r--r--tests/bscs-merge.pass/symblinks.in/vu1
l---------tests/bscs-merge.pass/symblinks.out/systems/default1
l---------tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v11
l---------tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1v21
l---------tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1vu1
l---------tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1vuv21
l---------tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/v1vu1
l---------tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/v1vuv21
l---------tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/vu1
l---------tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/vuv21
l---------tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/v1v21
l---------tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/v1vuv21
l---------tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/v21
l---------tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/vuv21
l---------tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v11
l---------tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1v21
l---------tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1vu1
l---------tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1vuv21
l---------tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v21
l---------tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/vu1
l---------tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/vuv21
-rw-r--r--tests/bscs-merge.pass/symblinks.out/v11
-rw-r--r--tests/bscs-merge.pass/symblinks.out/v21
-rw-r--r--tests/bscs-merge.pass/symblinks.out/vu1
l---------tests/bscs-merge.pass/upgrades.in/systems/default1
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file1 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file1)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file4 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file4)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file5 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file5)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file7 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file7)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file7.1 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file7.1)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/subdir1/subfile1 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/subdir1/subfile1)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/subdir1/subsubdir2/subsubfile40
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/factory/run/etc/file2 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file2)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/factory/run/etc/file5 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file5)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/factory/run/etc/file6 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file6)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/factory/run/etc/file7 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file7)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file3 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file3)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file4 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file4)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file6 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file6)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file7 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file7)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file7.1 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file7.1)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/subdir1/subfile1 (renamed from baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/subdir1/subfile1)0
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/subdir1/subsubdir2/subsubfile40
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file32
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file42
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file62
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file72
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file7.18
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/subdir1/subfile110
-rw-r--r--tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/subdir1/subsubdir2/subsubfile40
l---------tests/bscs-merge.pass/upgrades.out/systems/default1
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file12
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file42
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file52
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file72
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file7.18
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/subdir1/subfile110
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/subdir1/subsubdir2/subsubfile40
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file22
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file52
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file62
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file72
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file32
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file42
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file62
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file72
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file7.18
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/subdir1/subfile110
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/subdir1/subsubdir2/subsubfile40
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file12
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file22
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file32
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file42
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file52
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file62
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file72
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7.18
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7.rej6
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/subdir1/subfile110
-rw-r--r--tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/subdir1/subsubdir2/subsubfile40
l---------tests/bscs-sync.in/systems/default1
l---------tests/bscs-sync.in/systems/factory/orig/etc/config1
-rw-r--r--tests/bscs-sync.in/systems/factory/orig/etc/config12
-rw-r--r--tests/bscs-sync.in/systems/factory/orig/etc/folder1/config22
l---------tests/bscs-sync.in/systems/factory/run/etc/config1
-rw-r--r--tests/bscs-sync.in/systems/factory/run/etc/config13
-rw-r--r--tests/bscs-sync.in/systems/factory/run/etc/folder1/config22
l---------tests/bscs-sync.in/systems/version2/orig/etc/config1
-rw-r--r--tests/bscs-sync.in/systems/version2/orig/etc/config12
-rw-r--r--tests/bscs-sync.in/systems/version2/orig/etc/folder1/config22
l---------tests/bscs-sync.in/systems/version2/run/etc/config1
-rw-r--r--tests/bscs-sync.in/systems/version2/run/etc/config13
-rw-r--r--tests/bscs-sync.in/systems/version2/run/etc/folder1/config22
-rw-r--r--tests/bscs-sync.in/systems/version2/run/etc/folder2/iamgoingbeoverwritten0
l---------tests/bscs-sync.in/systems/version3/orig/etc/config1
-rw-r--r--tests/bscs-sync.in/systems/version3/orig/etc/config12
-rw-r--r--tests/bscs-sync.in/systems/version3/orig/etc/folder1/config22
l---------tests/bscs-sync.in/systems/version3/run/etc/config1
-rw-r--r--tests/bscs-sync.in/systems/version3/run/etc/config13
-rw-r--r--tests/bscs-sync.in/systems/version3/run/etc/folder1/config22
l---------tests/bscs-sync.out/systems/default1
l---------tests/bscs-sync.out/systems/factory/orig/etc/config1
-rw-r--r--tests/bscs-sync.out/systems/factory/orig/etc/config12
-rw-r--r--tests/bscs-sync.out/systems/factory/orig/etc/folder1/config22
l---------tests/bscs-sync.out/systems/factory/run/etc/config1
-rw-r--r--tests/bscs-sync.out/systems/factory/run/etc/config13
-rw-r--r--tests/bscs-sync.out/systems/factory/run/etc/folder1/config22
l---------tests/bscs-sync.out/systems/version2/orig/etc/config1
-rw-r--r--tests/bscs-sync.out/systems/version2/orig/etc/config12
-rw-r--r--tests/bscs-sync.out/systems/version2/orig/etc/folder1/config22
l---------tests/bscs-sync.out/systems/version2/run/etc/config1
-rw-r--r--tests/bscs-sync.out/systems/version2/run/etc/config13
-rw-r--r--tests/bscs-sync.out/systems/version2/run/etc/folder1/config22
l---------tests/bscs-sync.out/systems/version3/orig/etc/config1
-rw-r--r--tests/bscs-sync.out/systems/version3/orig/etc/config12
-rw-r--r--tests/bscs-sync.out/systems/version3/orig/etc/folder1/config22
l---------tests/bscs-sync.out/systems/version3/run/etc/config1
-rw-r--r--tests/bscs-sync.out/systems/version3/run/etc/config13
-rw-r--r--tests/bscs-sync.out/systems/version3/run/etc/folder1/config22
-rwxr-xr-xtests/fake_mounting_script.sh36
-rwxr-xr-xtests/run_tests.sh72
222 files changed, 1003 insertions, 33 deletions
diff --git a/baserock-system-config-sync/baserock-system-config-sync b/baserock-system-config-sync/baserock-system-config-sync
index c9f2de0..9b00625 100755
--- a/baserock-system-config-sync/baserock-system-config-sync
+++ b/baserock-system-config-sync/baserock-system-config-sync
@@ -17,13 +17,13 @@
set -eu
+: ${mounting_script="$(dirname "$0")/../libexec/mount-system-versions-dir"}
-mounting_script="$(dirname "$0")/../libexec/mount-system-versions-dir"
+: ${unmount="umount"}
usage() {
- echo "Usage: $(basename $0) test V1_DIR VU_DIR V2_DIR VT_DIR" >&2
- echo " $(basename $0) merge NEW_VERSION_LABEL" >&2
+ echo "Usage: $(basename $0) merge NEW_VERSION_LABEL" >&2
echo " $(basename $0) sync CANONICAL_VERSION_LABEL" >&2
exit 1
}
@@ -35,8 +35,7 @@ die () {
}
-file_type()
-{
+file_type() {
mode=$(printf '%o\n' 0x$(stat -c %f "$1"))
case "$mode" in
140???) echo "socket" ;;
@@ -55,7 +54,7 @@ check_same_type() {
type1="$(file_type $1)"
type2="$(file_type $2)"
if [ "$type1" != "$type2" ]; then
- die "found two different types for '$3':" \
+ die "ERROR: found two different types for '$3':" \
"$type1 and $type2"
fi
}
@@ -173,20 +172,7 @@ if [ "$#" = 0 ]; then
fi
-if [ "$1" = "test" ]; then
- if [ "$#" != 5 ]; then
- usage "$0"
- fi
- local v1="$2"
- local vu="$3"
- local v2="$4"
- local vt="$5"
- mkdir -p "$vt"
- # For every pathname in V1, Vuser, or V2
- merge "$v1" "$v1" "$vu" "$v2" "$vt"
- merge "$vu" "$v1" "$vu" "$v2" "$vt"
- merge "$v2" "$v1" "$vu" "$v2" "$vt"
-elif [ "$1" = "merge" ]; then
+if [ "$1" = "merge" ]; then
if [ "$#" != 2 ]; then
usage "$0"
fi
@@ -194,6 +180,7 @@ elif [ "$1" = "merge" ]; then
local mounting_point=$(mktemp -d)
"$mounting_script" "$mounting_point"
if [ ! -d "$mounting_point/systems/$new_version" ]; then
+ "$unmount" "$mounting_point"
die "Error: version not found - '$new_version'"
fi
local v1_dir="$mounting_point/systems/default/orig/etc"
@@ -201,7 +188,7 @@ elif [ "$1" = "merge" ]; then
local v2_dir="$mounting_point/systems/$new_version/run/etc"
local vt_dir="$mounting_point/systems/$new_version/run/etc.new"
mkdir "$vt_dir"
-
+ trap 'rm -rvf "$vt_dir"; "$unmount" "$mounting_point"' EXIT
# For every pathname in V1, Vuser, or V2
merge "$v1_dir" "$v1_dir" "$vu_dir" "$v2_dir" "$vt_dir"
merge "$vu_dir" "$v1_dir" "$vu_dir" "$v2_dir" "$vt_dir"
@@ -209,11 +196,11 @@ elif [ "$1" = "merge" ]; then
rm -rf "$v2_dir"
mv "$vt_dir" "$v2_dir"
- umount "$mounting_point"
elif [ "$1" = "sync" ]; then
local canonical_version="$2"
local mounting_point=$(mktemp -d)
"$mounting_script" "$mounting_point"
+ trap '"$unmount" "$mounting_point"' EXIT
if [ ! -d "$mounting_point/systems/$canonical_version" ]; then
die "Error: version not found - '$canonical_version'"
fi
@@ -228,7 +215,6 @@ elif [ "$1" = "sync" ]; then
rm -rf "$version_dir/run/etc.old"
fi
done
- umount "$mounting_point"
else
usage "$0"
fi
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1/sl1 b/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1/sl1
deleted file mode 120000
index d09a60b..0000000
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1/sl1
+++ /dev/null
@@ -1 +0,0 @@
-../v1f \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1/sl2 b/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1/sl2
deleted file mode 120000
index d09a60b..0000000
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1/sl2
+++ /dev/null
@@ -1 +0,0 @@
-../v1f \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1/sl3 b/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1/sl3
deleted file mode 120000
index d09a60b..0000000
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1/sl3
+++ /dev/null
@@ -1 +0,0 @@
-../v1f \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2/sl1 b/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2/sl1
deleted file mode 120000
index e4b01f1..0000000
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2/sl1
+++ /dev/null
@@ -1 +0,0 @@
-../v2f \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2/sl3 b/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2/sl3
deleted file mode 120000
index e4b01f1..0000000
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2/sl3
+++ /dev/null
@@ -1 +0,0 @@
-../v2f \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2/sl4 b/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2/sl4
deleted file mode 120000
index e4b01f1..0000000
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2/sl4
+++ /dev/null
@@ -1 +0,0 @@
-../v2f \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vu/sl1 b/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vu/sl1
deleted file mode 120000
index fcf9fc4..0000000
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vu/sl1
+++ /dev/null
@@ -1 +0,0 @@
-../vuf \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vu/sl2 b/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vu/sl2
deleted file mode 120000
index fcf9fc4..0000000
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vu/sl2
+++ /dev/null
@@ -1 +0,0 @@
-../vuf \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vu/sl4 b/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vu/sl4
deleted file mode 120000
index fcf9fc4..0000000
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vu/sl4
+++ /dev/null
@@ -1 +0,0 @@
-../vuf \ No newline at end of file
diff --git a/tests/bscs-merge.fail/dir.symb.in/systems/default b/tests/bscs-merge.fail/dir.symb.in/systems/default
new file mode 120000
index 0000000..0f51808
--- /dev/null
+++ b/tests/bscs-merge.fail/dir.symb.in/systems/default
@@ -0,0 +1 @@
+factory \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.dir.symb/vu/1 b/tests/bscs-merge.fail/dir.symb.in/systems/factory/orig/etc/1
index 6a93f4f..6a93f4f 120000
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.dir.symb/vu/1
+++ b/tests/bscs-merge.fail/dir.symb.in/systems/factory/orig/etc/1
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.dir.symb/vu/afile b/tests/bscs-merge.fail/dir.symb.in/systems/factory/orig/etc/afile
index e69de29..e69de29 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.dir.symb/vu/afile
+++ b/tests/bscs-merge.fail/dir.symb.in/systems/factory/orig/etc/afile
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.symb/vu/1 b/tests/bscs-merge.fail/dir.symb.in/systems/factory/run/etc/1
index 6a93f4f..6a93f4f 120000
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.symb/vu/1
+++ b/tests/bscs-merge.fail/dir.symb.in/systems/factory/run/etc/1
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.symb/vu/afile b/tests/bscs-merge.fail/dir.symb.in/systems/factory/run/etc/afile
index e69de29..e69de29 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.symb/vu/afile
+++ b/tests/bscs-merge.fail/dir.symb.in/systems/factory/run/etc/afile
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.dir/v1/1 b/tests/bscs-merge.fail/dir.symb.in/systems/version2/orig/etc/1/gitdoesnotlikemptydirs
index e69de29..e69de29 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.dir/v1/1
+++ b/tests/bscs-merge.fail/dir.symb.in/systems/version2/orig/etc/1/gitdoesnotlikemptydirs
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.dir/v2/1 b/tests/bscs-merge.fail/dir.symb.in/systems/version2/run/etc/1/gitdoesnotlikemptydirs
index e69de29..e69de29 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.dir/v2/1
+++ b/tests/bscs-merge.fail/dir.symb.in/systems/version2/run/etc/1/gitdoesnotlikemptydirs
diff --git a/tests/bscs-merge.fail/regular.dir.in/systems/default b/tests/bscs-merge.fail/regular.dir.in/systems/default
new file mode 120000
index 0000000..0f51808
--- /dev/null
+++ b/tests/bscs-merge.fail/regular.dir.in/systems/default
@@ -0,0 +1 @@
+factory \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.symb/v1/1 b/tests/bscs-merge.fail/regular.dir.in/systems/factory/orig/etc/1
index e69de29..e69de29 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.symb/v1/1
+++ b/tests/bscs-merge.fail/regular.dir.in/systems/factory/orig/etc/1
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.symb/v2/1 b/tests/bscs-merge.fail/regular.dir.in/systems/factory/run/etc/1
index e69de29..e69de29 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.regular.symb/v2/1
+++ b/tests/bscs-merge.fail/regular.dir.in/systems/factory/run/etc/1
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1f b/tests/bscs-merge.fail/regular.dir.in/systems/version2/orig/etc/1/gitdoesnotlikemptydirs
index e69de29..e69de29 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v1f
+++ b/tests/bscs-merge.fail/regular.dir.in/systems/version2/orig/etc/1/gitdoesnotlikemptydirs
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2f b/tests/bscs-merge.fail/regular.dir.in/systems/version2/run/etc/1/gitdoesnotlikemptydirs
index e69de29..e69de29 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/v2f
+++ b/tests/bscs-merge.fail/regular.dir.in/systems/version2/run/etc/1/gitdoesnotlikemptydirs
diff --git a/tests/bscs-merge.fail/regular.symb.in/systems/default b/tests/bscs-merge.fail/regular.symb.in/systems/default
new file mode 120000
index 0000000..0f51808
--- /dev/null
+++ b/tests/bscs-merge.fail/regular.symb.in/systems/default
@@ -0,0 +1 @@
+factory \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vuf b/tests/bscs-merge.fail/regular.symb.in/systems/factory/orig/etc/1
index e69de29..e69de29 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.symblinks/vuf
+++ b/tests/bscs-merge.fail/regular.symb.in/systems/factory/orig/etc/1
diff --git a/tests/bscs-merge.fail/regular.symb.in/systems/factory/run/etc/1 b/tests/bscs-merge.fail/regular.symb.in/systems/factory/run/etc/1
new file mode 120000
index 0000000..6a93f4f
--- /dev/null
+++ b/tests/bscs-merge.fail/regular.symb.in/systems/factory/run/etc/1
@@ -0,0 +1 @@
+afile \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/subdir1/subsubdir2/subsubfile4 b/tests/bscs-merge.fail/regular.symb.in/systems/factory/run/etc/afile
index e69de29..e69de29 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/subdir1/subsubdir2/subsubfile4
+++ b/tests/bscs-merge.fail/regular.symb.in/systems/factory/run/etc/afile
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/subdir1/subsubdir2/subsubfile4 b/tests/bscs-merge.fail/regular.symb.in/systems/version2/orig/etc/1
index e69de29..e69de29 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/subdir1/subsubdir2/subsubfile4
+++ b/tests/bscs-merge.fail/regular.symb.in/systems/version2/orig/etc/1
diff --git a/tests/bscs-merge.fail/regular.symb.in/systems/version2/run/etc/1 b/tests/bscs-merge.fail/regular.symb.in/systems/version2/run/etc/1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.fail/regular.symb.in/systems/version2/run/etc/1
diff --git a/tests/bscs-merge.pass/empty.in/systems/default b/tests/bscs-merge.pass/empty.in/systems/default
new file mode 120000
index 0000000..0f51808
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/default
@@ -0,0 +1 @@
+factory \ No newline at end of file
diff --git a/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1v2-1 b/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1v2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1v2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1v2-2 b/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1v2-2
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1v2-2
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1vu-1 b/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1vu-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1vu-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1vu-2 b/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1vu-2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1vu-2
diff --git a/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1vuv2-1 b/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1vuv2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/factory/orig/etc/v1vuv2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/v1vu-1 b/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/v1vu-1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/v1vu-1
diff --git a/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/v1vu-2 b/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/v1vu-2
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/v1vu-2
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/v1vuv2-1 b/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/v1vuv2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/v1vuv2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/vuv2-1 b/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/vuv2-1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/vuv2-1
diff --git a/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/vuv2-2 b/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/vuv2-2
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/factory/run/etc/vuv2-2
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/v1v2-1 b/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/v1v2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/v1v2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/v1v2-2 b/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/v1v2-2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/v1v2-2
diff --git a/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/v1vuv2-1 b/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/v1vuv2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/v1vuv2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/vuv2-1 b/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/vuv2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/vuv2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/vuv2-2 b/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/vuv2-2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/version2/orig/etc/vuv2-2
diff --git a/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/v1v2-1 b/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/v1v2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/v1v2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/v1v2-2 b/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/v1v2-2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/v1v2-2
diff --git a/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/v1vuv2-1 b/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/v1vuv2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/v1vuv2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/vuv2-1 b/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/vuv2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/vuv2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/vuv2-2 b/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/vuv2-2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.in/systems/version2/run/etc/vuv2-2
diff --git a/tests/bscs-merge.pass/empty.out/systems/default b/tests/bscs-merge.pass/empty.out/systems/default
new file mode 120000
index 0000000..0f51808
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/default
@@ -0,0 +1 @@
+factory \ No newline at end of file
diff --git a/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1v2-1 b/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1v2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1v2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1v2-2 b/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1v2-2
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1v2-2
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1vu-1 b/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1vu-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1vu-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1vu-2 b/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1vu-2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1vu-2
diff --git a/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1vuv2-1 b/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1vuv2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/factory/orig/etc/v1vuv2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/v1vu-1 b/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/v1vu-1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/v1vu-1
diff --git a/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/v1vu-2 b/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/v1vu-2
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/v1vu-2
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/v1vuv2-1 b/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/v1vuv2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/v1vuv2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/vuv2-1 b/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/vuv2-1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/vuv2-1
diff --git a/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/vuv2-2 b/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/vuv2-2
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/factory/run/etc/vuv2-2
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/v1v2-1 b/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/v1v2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/v1v2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/v1v2-2 b/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/v1v2-2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/v1v2-2
diff --git a/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/v1vuv2-1 b/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/v1vuv2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/v1vuv2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/vuv2-1 b/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/vuv2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/vuv2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/vuv2-2 b/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/vuv2-2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/version2/orig/etc/vuv2-2
diff --git a/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1v2-1 b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1v2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1v2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1v2-2 b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1v2-2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1v2-2
diff --git a/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1vu-1 b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1vu-1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1vu-1
diff --git a/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1vu-2 b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1vu-2
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1vu-2
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1vuv2-1 b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1vuv2-1
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/v1vuv2-1
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/vuv2-1 b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/vuv2-1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/vuv2-1
diff --git a/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/vuv2-2 b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/vuv2-2
new file mode 100644
index 0000000..a7f8d9e
--- /dev/null
+++ b/tests/bscs-merge.pass/empty.out/systems/version2/run/etc/vuv2-2
@@ -0,0 +1 @@
+bla
diff --git a/tests/bscs-merge.pass/sshconf.in/systems/default b/tests/bscs-merge.pass/sshconf.in/systems/default
new file mode 120000
index 0000000..0f51808
--- /dev/null
+++ b/tests/bscs-merge.pass/sshconf.in/systems/default
@@ -0,0 +1 @@
+factory \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.etc/v1/sshd_config b/tests/bscs-merge.pass/sshconf.in/systems/factory/orig/etc/sshd_config
index 98fa27e..98fa27e 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.etc/v1/sshd_config
+++ b/tests/bscs-merge.pass/sshconf.in/systems/factory/orig/etc/sshd_config
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.etc/vu/sshd_config b/tests/bscs-merge.pass/sshconf.in/systems/factory/run/etc/sshd_config
index c4b25e9..c4b25e9 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.etc/vu/sshd_config
+++ b/tests/bscs-merge.pass/sshconf.in/systems/factory/run/etc/sshd_config
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades.etc/v2/sshd_config b/tests/bscs-merge.pass/sshconf.in/systems/version2/orig/etc/sshd_config
index 4e6a5d3..4e6a5d3 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades.etc/v2/sshd_config
+++ b/tests/bscs-merge.pass/sshconf.in/systems/version2/orig/etc/sshd_config
diff --git a/tests/bscs-merge.pass/sshconf.in/systems/version2/run/etc/sshd_config b/tests/bscs-merge.pass/sshconf.in/systems/version2/run/etc/sshd_config
new file mode 100644
index 0000000..4e6a5d3
--- /dev/null
+++ b/tests/bscs-merge.pass/sshconf.in/systems/version2/run/etc/sshd_config
@@ -0,0 +1,123 @@
+# $OpenBSD: sshd_config,v 1.84 2011/05/23 03:30:07 djm Exp $
+
+# This is the sshd server system-wide configuration file. See
+# sshd_config(5) for more information.
+
+# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
+
+# The strategy used for options in the default sshd_config shipped with
+# OpenSSH is to specify options with their default value where
+# possible, but leave them commented. Uncommented options override the
+# default value.
+
+#Port 22
+#AddressFamily any
+#ListenAddress 0.0.0.0
+#ListenAddress ::
+
+# The default requires explicit activation of protocol 1
+#Protocol 2
+
+# HostKey for protocol version 1
+#HostKey /etc/ssh/ssh_host_key
+# HostKeys for protocol version 2
+#HostKey /etc/ssh/ssh_host_rsa_key
+#HostKey /etc/ssh/ssh_host_dsa_key
+#HostKey /etc/ssh/ssh_host_ecdsa_key
+
+# Lifetime and size of ephemeral version 1 server key
+#KeyRegenerationInterval 1h
+#ServerKeyBits 1024
+
+# Logging
+# obsoletes QuietMode and FascistLogging
+#SyslogFacility AUTH
+#LogLevel INFO
+
+# Authentication:
+
+#LoginGraceTime 2m
+#PermitRootLogin yes
+#StrictModes yes
+#MaxAuthTries 6
+#MaxSessions 10
+
+#RSAAuthentication yes
+#PubkeyAuthentication yes
+
+# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
+# but this is overridden so installations will only check .ssh/authorized_keys
+AuthorizedKeysFile .ssh/authorized_keys
+
+# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
+#RhostsRSAAuthentication no
+# similar for protocol version 2
+#HostbasedAuthentication no
+# Change to yes if you don't trust ~/.ssh/known_hosts for
+# RhostsRSAAuthentication and HostbasedAuthentication
+#IgnoreUserKnownHosts no
+# Don't read the user's ~/.rhosts and ~/.shosts files
+#IgnoreRhosts yes
+
+# To disable tunneled clear text passwords, change to no here!
+#PasswordAuthentication yes
+#PermitEmptyPasswords no
+
+# Change to no to disable s/key passwords
+#ChallengeResponseAuthentication yes
+
+# Kerberos options
+#KerberosAuthentication no
+#KerberosOrLocalPasswd yes
+#KerberosTicketCleanup yes
+#KerberosGetAFSToken no
+
+# GSSAPI options
+#GSSAPIAuthentication no
+#GSSAPICleanupCredentials yes
+
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
+# be allowed through the ChallengeResponseAuthentication and
+# PasswordAuthentication. Depending on your PAM configuration,
+# PAM authentication via ChallengeResponseAuthentication may bypass
+# the setting of "PermitRootLogin without-password".
+# If you just want the PAM account and session checks to run without
+# PAM authentication, then enable this but set PasswordAuthentication
+# and ChallengeResponseAuthentication to 'no'.
+#UsePAM no
+
+#AllowAgentForwarding yes
+#AllowTcpForwarding yes
+#GatewayPorts no
+#X11Forwarding no
+#X11DisplayOffset 10
+#X11UseLocalhost yes
+#PrintMotd yes
+#PrintLastLog yes
+#TCPKeepAlive yes
+#UseLogin no
+#UsePrivilegeSeparation yes
+PermitUserEnvironment yes
+#Compression delayed
+#ClientAliveInterval 0
+#ClientAliveCountMax 3
+#UseDNS yes
+#PidFile /var/run/sshd.pid
+#MaxStartups 10
+#PermitTunnel no
+ChrootDirectory none
+
+# no default banner path
+#Banner none
+
+# override default of no subsystems
+Subsystem sftp /usr/lib/openssh/sftp-server
+
+# Example of overriding settings on a per-user basis
+#Match User anoncvs
+# X11Forwarding no
+# AllowTcpForwarding no
+# ForceCommand cvs server
+
+AcceptEnv LANG LC_*
diff --git a/tests/bscs-merge.pass/sshconf.out/systems/default b/tests/bscs-merge.pass/sshconf.out/systems/default
new file mode 120000
index 0000000..0f51808
--- /dev/null
+++ b/tests/bscs-merge.pass/sshconf.out/systems/default
@@ -0,0 +1 @@
+factory \ No newline at end of file
diff --git a/tests/bscs-merge.pass/sshconf.out/systems/factory/orig/etc/sshd_config b/tests/bscs-merge.pass/sshconf.out/systems/factory/orig/etc/sshd_config
new file mode 100644
index 0000000..98fa27e
--- /dev/null
+++ b/tests/bscs-merge.pass/sshconf.out/systems/factory/orig/etc/sshd_config
@@ -0,0 +1,123 @@
+# $OpenBSD: sshd_config,v 1.84 2011/05/23 03:30:07 djm Exp $
+
+# This is the sshd server system-wide configuration file. See
+# sshd_config(5) for more information.
+
+# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
+
+# The strategy used for options in the default sshd_config shipped with
+# OpenSSH is to specify options with their default value where
+# possible, but leave them commented. Uncommented options override the
+# default value.
+
+#Port 22
+#AddressFamily any
+#ListenAddress 0.0.0.0
+#ListenAddress ::
+
+# The default requires explicit activation of protocol 1
+#Protocol 2
+
+# HostKey for protocol version 1
+#HostKey /etc/ssh/ssh_host_key
+# HostKeys for protocol version 2
+#HostKey /etc/ssh/ssh_host_rsa_key
+#HostKey /etc/ssh/ssh_host_dsa_key
+#HostKey /etc/ssh/ssh_host_ecdsa_key
+
+# Lifetime and size of ephemeral version 1 server key
+#KeyRegenerationInterval 1h
+#ServerKeyBits 1024
+
+# Logging
+# obsoletes QuietMode and FascistLogging
+#SyslogFacility AUTH
+#LogLevel INFO
+
+# Authentication:
+
+#LoginGraceTime 2m
+#PermitRootLogin yes
+#StrictModes yes
+#MaxAuthTries 6
+#MaxSessions 10
+
+#RSAAuthentication yes
+#PubkeyAuthentication yes
+
+# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
+# but this is overridden so installations will only check .ssh/authorized_keys
+AuthorizedKeysFile .ssh/authorized_keys
+
+# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
+#RhostsRSAAuthentication no
+# similar for protocol version 2
+#HostbasedAuthentication no
+# Change to yes if you don't trust ~/.ssh/known_hosts for
+# RhostsRSAAuthentication and HostbasedAuthentication
+#IgnoreUserKnownHosts no
+# Don't read the user's ~/.rhosts and ~/.shosts files
+#IgnoreRhosts yes
+
+# To disable tunneled clear text passwords, change to no here!
+#PasswordAuthentication yes
+#PermitEmptyPasswords no
+
+# Change to no to disable s/key passwords
+#ChallengeResponseAuthentication yes
+
+# Kerberos options
+#KerberosAuthentication no
+#KerberosOrLocalPasswd yes
+#KerberosTicketCleanup yes
+#KerberosGetAFSToken no
+
+# GSSAPI options
+#GSSAPIAuthentication no
+#GSSAPICleanupCredentials yes
+
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
+# be allowed through the ChallengeResponseAuthentication and
+# PasswordAuthentication. Depending on your PAM configuration,
+# PAM authentication via ChallengeResponseAuthentication may bypass
+# the setting of "PermitRootLogin without-password".
+# If you just want the PAM account and session checks to run without
+# PAM authentication, then enable this but set PasswordAuthentication
+# and ChallengeResponseAuthentication to 'no'.
+#UsePAM no
+
+#AllowAgentForwarding yes
+#AllowTcpForwarding yes
+#GatewayPorts no
+#X11Forwarding no
+#X11DisplayOffset 10
+#X11UseLocalhost yes
+#PrintMotd yes
+#PrintLastLog yes
+#TCPKeepAlive yes
+#UseLogin no
+#UsePrivilegeSeparation yes
+PermitUserEnvironment yes
+#Compression delayed
+#ClientAliveInterval 0
+#ClientAliveCountMax 3
+#UseDNS yes
+#PidFile /var/run/sshd.pid
+#MaxStartups 10
+#PermitTunnel no
+#ChrootDirectory none
+
+# no default banner path
+#Banner none
+
+# override default of no subsystems
+Subsystem sftp /usr/lib/openssh/sftp-server
+
+# Example of overriding settings on a per-user basis
+#Match User anoncvs
+# X11Forwarding no
+# AllowTcpForwarding no
+# ForceCommand cvs server
+
+AcceptEnv LANG LC_*
diff --git a/tests/bscs-merge.pass/sshconf.out/systems/factory/run/etc/sshd_config b/tests/bscs-merge.pass/sshconf.out/systems/factory/run/etc/sshd_config
new file mode 100644
index 0000000..c4b25e9
--- /dev/null
+++ b/tests/bscs-merge.pass/sshconf.out/systems/factory/run/etc/sshd_config
@@ -0,0 +1,123 @@
+# $OpenBSD: sshd_config,v 1.84 2011/05/23 03:30:07 djm Exp $
+
+# This is the sshd server system-wide configuration file. See
+# sshd_config(5) for more information.
+
+# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
+
+# The strategy used for options in the default sshd_config shipped with
+# OpenSSH is to specify options with their default value where
+# possible, but leave them commented. Uncommented options override the
+# default value.
+
+#Port 22
+#AddressFamily any
+#ListenAddress 0.0.0.0
+#ListenAddress ::
+
+# The default requires explicit activation of protocol 1
+#Protocol 2
+
+# HostKey for protocol version 1
+#HostKey /etc/ssh/ssh_host_key
+# HostKeys for protocol version 2
+#HostKey /etc/ssh/ssh_host_rsa_key
+#HostKey /etc/ssh/ssh_host_dsa_key
+#HostKey /etc/ssh/ssh_host_ecdsa_key
+
+# Lifetime and size of ephemeral version 1 server key
+#KeyRegenerationInterval 1h
+#ServerKeyBits 1024
+
+# Logging
+# obsoletes QuietMode and FascistLogging
+#SyslogFacility AUTH
+#LogLevel INFO
+
+# Authentication:
+
+#LoginGraceTime 2m
+#PermitRootLogin yes
+#StrictModes yes
+#MaxAuthTries 6
+#MaxSessions 10
+
+#RSAAuthentication yes
+#PubkeyAuthentication yes
+
+# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
+# but this is overridden so installations will only check .ssh/authorized_keys
+AuthorizedKeysFile .ssh/authorized_keys
+
+# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
+#RhostsRSAAuthentication no
+# similar for protocol version 2
+#HostbasedAuthentication no
+# Change to yes if you don't trust ~/.ssh/known_hosts for
+# RhostsRSAAuthentication and HostbasedAuthentication
+#IgnoreUserKnownHosts no
+# Don't read the user's ~/.rhosts and ~/.shosts files
+#IgnoreRhosts yes
+
+# To disable tunneled clear text passwords, change to no here!
+#PasswordAuthentication yes
+#PermitEmptyPasswords no
+
+# Change to no to disable s/key passwords
+#ChallengeResponseAuthentication yes
+
+# Kerberos options
+#KerberosAuthentication no
+#KerberosOrLocalPasswd yes
+#KerberosTicketCleanup yes
+#KerberosGetAFSToken no
+
+# GSSAPI options
+#GSSAPIAuthentication no
+#GSSAPICleanupCredentials yes
+
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
+# be allowed through the ChallengeResponseAuthentication and
+# PasswordAuthentication. Depending on your PAM configuration,
+# PAM authentication via ChallengeResponseAuthentication may bypass
+# the setting of "PermitRootLogin without-password".
+# If you just want the PAM account and session checks to run without
+# PAM authentication, then enable this but set PasswordAuthentication
+# and ChallengeResponseAuthentication to 'no'.
+#UsePAM no
+
+#AllowAgentForwarding yes
+#AllowTcpForwarding yes
+#GatewayPorts no
+#X11Forwarding no
+#X11DisplayOffset 10
+#X11UseLocalhost yes
+#PrintMotd yes
+#PrintLastLog yes
+#TCPKeepAlive yes
+UseLogin no
+#UsePrivilegeSeparation yes
+PermitUserEnvironment yes
+#Compression delayed
+#ClientAliveInterval 0
+#ClientAliveCountMax 3
+#UseDNS yes
+#PidFile /var/run/sshd.pid
+#MaxStartups 10
+#PermitTunnel no
+#ChrootDirectory none
+
+# no default banner path
+#Banner none
+
+# override default of no subsystems
+Subsystem sftp /usr/lib/openssh/sftp-server
+
+# Example of overriding settings on a per-user basis
+#Match User anoncvs
+# X11Forwarding no
+# AllowTcpForwarding no
+# ForceCommand cvs server
+
+AcceptEnv LANG LC_*
diff --git a/tests/bscs-merge.pass/sshconf.out/systems/version2/orig/etc/sshd_config b/tests/bscs-merge.pass/sshconf.out/systems/version2/orig/etc/sshd_config
new file mode 100644
index 0000000..4e6a5d3
--- /dev/null
+++ b/tests/bscs-merge.pass/sshconf.out/systems/version2/orig/etc/sshd_config
@@ -0,0 +1,123 @@
+# $OpenBSD: sshd_config,v 1.84 2011/05/23 03:30:07 djm Exp $
+
+# This is the sshd server system-wide configuration file. See
+# sshd_config(5) for more information.
+
+# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
+
+# The strategy used for options in the default sshd_config shipped with
+# OpenSSH is to specify options with their default value where
+# possible, but leave them commented. Uncommented options override the
+# default value.
+
+#Port 22
+#AddressFamily any
+#ListenAddress 0.0.0.0
+#ListenAddress ::
+
+# The default requires explicit activation of protocol 1
+#Protocol 2
+
+# HostKey for protocol version 1
+#HostKey /etc/ssh/ssh_host_key
+# HostKeys for protocol version 2
+#HostKey /etc/ssh/ssh_host_rsa_key
+#HostKey /etc/ssh/ssh_host_dsa_key
+#HostKey /etc/ssh/ssh_host_ecdsa_key
+
+# Lifetime and size of ephemeral version 1 server key
+#KeyRegenerationInterval 1h
+#ServerKeyBits 1024
+
+# Logging
+# obsoletes QuietMode and FascistLogging
+#SyslogFacility AUTH
+#LogLevel INFO
+
+# Authentication:
+
+#LoginGraceTime 2m
+#PermitRootLogin yes
+#StrictModes yes
+#MaxAuthTries 6
+#MaxSessions 10
+
+#RSAAuthentication yes
+#PubkeyAuthentication yes
+
+# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
+# but this is overridden so installations will only check .ssh/authorized_keys
+AuthorizedKeysFile .ssh/authorized_keys
+
+# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
+#RhostsRSAAuthentication no
+# similar for protocol version 2
+#HostbasedAuthentication no
+# Change to yes if you don't trust ~/.ssh/known_hosts for
+# RhostsRSAAuthentication and HostbasedAuthentication
+#IgnoreUserKnownHosts no
+# Don't read the user's ~/.rhosts and ~/.shosts files
+#IgnoreRhosts yes
+
+# To disable tunneled clear text passwords, change to no here!
+#PasswordAuthentication yes
+#PermitEmptyPasswords no
+
+# Change to no to disable s/key passwords
+#ChallengeResponseAuthentication yes
+
+# Kerberos options
+#KerberosAuthentication no
+#KerberosOrLocalPasswd yes
+#KerberosTicketCleanup yes
+#KerberosGetAFSToken no
+
+# GSSAPI options
+#GSSAPIAuthentication no
+#GSSAPICleanupCredentials yes
+
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
+# be allowed through the ChallengeResponseAuthentication and
+# PasswordAuthentication. Depending on your PAM configuration,
+# PAM authentication via ChallengeResponseAuthentication may bypass
+# the setting of "PermitRootLogin without-password".
+# If you just want the PAM account and session checks to run without
+# PAM authentication, then enable this but set PasswordAuthentication
+# and ChallengeResponseAuthentication to 'no'.
+#UsePAM no
+
+#AllowAgentForwarding yes
+#AllowTcpForwarding yes
+#GatewayPorts no
+#X11Forwarding no
+#X11DisplayOffset 10
+#X11UseLocalhost yes
+#PrintMotd yes
+#PrintLastLog yes
+#TCPKeepAlive yes
+#UseLogin no
+#UsePrivilegeSeparation yes
+PermitUserEnvironment yes
+#Compression delayed
+#ClientAliveInterval 0
+#ClientAliveCountMax 3
+#UseDNS yes
+#PidFile /var/run/sshd.pid
+#MaxStartups 10
+#PermitTunnel no
+ChrootDirectory none
+
+# no default banner path
+#Banner none
+
+# override default of no subsystems
+Subsystem sftp /usr/lib/openssh/sftp-server
+
+# Example of overriding settings on a per-user basis
+#Match User anoncvs
+# X11Forwarding no
+# AllowTcpForwarding no
+# ForceCommand cvs server
+
+AcceptEnv LANG LC_*
diff --git a/tests/bscs-merge.pass/sshconf.out/systems/version2/run/etc/sshd_config b/tests/bscs-merge.pass/sshconf.out/systems/version2/run/etc/sshd_config
new file mode 100644
index 0000000..469d4f5
--- /dev/null
+++ b/tests/bscs-merge.pass/sshconf.out/systems/version2/run/etc/sshd_config
@@ -0,0 +1,123 @@
+# $OpenBSD: sshd_config,v 1.84 2011/05/23 03:30:07 djm Exp $
+
+# This is the sshd server system-wide configuration file. See
+# sshd_config(5) for more information.
+
+# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
+
+# The strategy used for options in the default sshd_config shipped with
+# OpenSSH is to specify options with their default value where
+# possible, but leave them commented. Uncommented options override the
+# default value.
+
+#Port 22
+#AddressFamily any
+#ListenAddress 0.0.0.0
+#ListenAddress ::
+
+# The default requires explicit activation of protocol 1
+#Protocol 2
+
+# HostKey for protocol version 1
+#HostKey /etc/ssh/ssh_host_key
+# HostKeys for protocol version 2
+#HostKey /etc/ssh/ssh_host_rsa_key
+#HostKey /etc/ssh/ssh_host_dsa_key
+#HostKey /etc/ssh/ssh_host_ecdsa_key
+
+# Lifetime and size of ephemeral version 1 server key
+#KeyRegenerationInterval 1h
+#ServerKeyBits 1024
+
+# Logging
+# obsoletes QuietMode and FascistLogging
+#SyslogFacility AUTH
+#LogLevel INFO
+
+# Authentication:
+
+#LoginGraceTime 2m
+#PermitRootLogin yes
+#StrictModes yes
+#MaxAuthTries 6
+#MaxSessions 10
+
+#RSAAuthentication yes
+#PubkeyAuthentication yes
+
+# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
+# but this is overridden so installations will only check .ssh/authorized_keys
+AuthorizedKeysFile .ssh/authorized_keys
+
+# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
+#RhostsRSAAuthentication no
+# similar for protocol version 2
+#HostbasedAuthentication no
+# Change to yes if you don't trust ~/.ssh/known_hosts for
+# RhostsRSAAuthentication and HostbasedAuthentication
+#IgnoreUserKnownHosts no
+# Don't read the user's ~/.rhosts and ~/.shosts files
+#IgnoreRhosts yes
+
+# To disable tunneled clear text passwords, change to no here!
+#PasswordAuthentication yes
+#PermitEmptyPasswords no
+
+# Change to no to disable s/key passwords
+#ChallengeResponseAuthentication yes
+
+# Kerberos options
+#KerberosAuthentication no
+#KerberosOrLocalPasswd yes
+#KerberosTicketCleanup yes
+#KerberosGetAFSToken no
+
+# GSSAPI options
+#GSSAPIAuthentication no
+#GSSAPICleanupCredentials yes
+
+# Set this to 'yes' to enable PAM authentication, account processing,
+# and session processing. If this is enabled, PAM authentication will
+# be allowed through the ChallengeResponseAuthentication and
+# PasswordAuthentication. Depending on your PAM configuration,
+# PAM authentication via ChallengeResponseAuthentication may bypass
+# the setting of "PermitRootLogin without-password".
+# If you just want the PAM account and session checks to run without
+# PAM authentication, then enable this but set PasswordAuthentication
+# and ChallengeResponseAuthentication to 'no'.
+#UsePAM no
+
+#AllowAgentForwarding yes
+#AllowTcpForwarding yes
+#GatewayPorts no
+#X11Forwarding no
+#X11DisplayOffset 10
+#X11UseLocalhost yes
+#PrintMotd yes
+#PrintLastLog yes
+#TCPKeepAlive yes
+UseLogin no
+#UsePrivilegeSeparation yes
+PermitUserEnvironment yes
+#Compression delayed
+#ClientAliveInterval 0
+#ClientAliveCountMax 3
+#UseDNS yes
+#PidFile /var/run/sshd.pid
+#MaxStartups 10
+#PermitTunnel no
+ChrootDirectory none
+
+# no default banner path
+#Banner none
+
+# override default of no subsystems
+Subsystem sftp /usr/lib/openssh/sftp-server
+
+# Example of overriding settings on a per-user basis
+#Match User anoncvs
+# X11Forwarding no
+# AllowTcpForwarding no
+# ForceCommand cvs server
+
+AcceptEnv LANG LC_*
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/default b/tests/bscs-merge.pass/symblinks.in/systems/default
new file mode 120000
index 0000000..0f51808
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/default
@@ -0,0 +1 @@
+factory \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1 b/tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1
new file mode 120000
index 0000000..446ec55
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1
@@ -0,0 +1 @@
+../../../../v1 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1v2 b/tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1v2
new file mode 120000
index 0000000..446ec55
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1v2
@@ -0,0 +1 @@
+../../../../v1 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1vu b/tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1vu
new file mode 120000
index 0000000..446ec55
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1vu
@@ -0,0 +1 @@
+../../../../v1 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1vuv2 b/tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1vuv2
new file mode 120000
index 0000000..446ec55
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/factory/orig/etc/v1vuv2
@@ -0,0 +1 @@
+../../../../v1 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/v1vu b/tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/v1vu
new file mode 120000
index 0000000..2abd9b7
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/v1vu
@@ -0,0 +1 @@
+../../../../vu \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/v1vuv2 b/tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/v1vuv2
new file mode 120000
index 0000000..2abd9b7
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/v1vuv2
@@ -0,0 +1 @@
+../../../../vu \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/vu b/tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/vu
new file mode 120000
index 0000000..2abd9b7
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/vu
@@ -0,0 +1 @@
+../../../../vu \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/vuv2 b/tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/vuv2
new file mode 120000
index 0000000..2abd9b7
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/factory/run/etc/vuv2
@@ -0,0 +1 @@
+../../../../vu \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/v1v2 b/tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/v1v2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/v1v2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/v1vuv2 b/tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/v1vuv2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/v1vuv2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/v2 b/tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/v2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/v2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/vuv2 b/tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/vuv2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/version2/orig/etc/vuv2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/v1v2 b/tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/v1v2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/v1v2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/v1vuv2 b/tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/v1vuv2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/v1vuv2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/v2 b/tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/v2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/v2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/vuv2 b/tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/vuv2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/systems/version2/run/etc/vuv2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.in/v1 b/tests/bscs-merge.pass/symblinks.in/v1
new file mode 100644
index 0000000..626799f
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/v1
@@ -0,0 +1 @@
+v1
diff --git a/tests/bscs-merge.pass/symblinks.in/v2 b/tests/bscs-merge.pass/symblinks.in/v2
new file mode 100644
index 0000000..8c1384d
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/v2
@@ -0,0 +1 @@
+v2
diff --git a/tests/bscs-merge.pass/symblinks.in/vu b/tests/bscs-merge.pass/symblinks.in/vu
new file mode 100644
index 0000000..4782f39
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.in/vu
@@ -0,0 +1 @@
+vu
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/default b/tests/bscs-merge.pass/symblinks.out/systems/default
new file mode 120000
index 0000000..0f51808
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/default
@@ -0,0 +1 @@
+factory \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1 b/tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1
new file mode 120000
index 0000000..446ec55
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1
@@ -0,0 +1 @@
+../../../../v1 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1v2 b/tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1v2
new file mode 120000
index 0000000..446ec55
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1v2
@@ -0,0 +1 @@
+../../../../v1 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1vu b/tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1vu
new file mode 120000
index 0000000..446ec55
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1vu
@@ -0,0 +1 @@
+../../../../v1 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1vuv2 b/tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1vuv2
new file mode 120000
index 0000000..446ec55
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/factory/orig/etc/v1vuv2
@@ -0,0 +1 @@
+../../../../v1 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/v1vu b/tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/v1vu
new file mode 120000
index 0000000..2abd9b7
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/v1vu
@@ -0,0 +1 @@
+../../../../vu \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/v1vuv2 b/tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/v1vuv2
new file mode 120000
index 0000000..2abd9b7
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/v1vuv2
@@ -0,0 +1 @@
+../../../../vu \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/vu b/tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/vu
new file mode 120000
index 0000000..2abd9b7
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/vu
@@ -0,0 +1 @@
+../../../../vu \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/vuv2 b/tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/vuv2
new file mode 120000
index 0000000..2abd9b7
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/factory/run/etc/vuv2
@@ -0,0 +1 @@
+../../../../vu \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/v1v2 b/tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/v1v2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/v1v2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/v1vuv2 b/tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/v1vuv2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/v1vuv2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/v2 b/tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/v2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/v2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/vuv2 b/tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/vuv2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/version2/orig/etc/vuv2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1 b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1
new file mode 120000
index 0000000..446ec55
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1
@@ -0,0 +1 @@
+../../../../v1 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1v2 b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1v2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1v2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1vu b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1vu
new file mode 120000
index 0000000..2abd9b7
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1vu
@@ -0,0 +1 @@
+../../../../vu \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1vuv2 b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1vuv2
new file mode 120000
index 0000000..2abd9b7
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v1vuv2
@@ -0,0 +1 @@
+../../../../vu \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v2 b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v2
new file mode 120000
index 0000000..e403242
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/v2
@@ -0,0 +1 @@
+../../../../v2 \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/vu b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/vu
new file mode 120000
index 0000000..2abd9b7
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/vu
@@ -0,0 +1 @@
+../../../../vu \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/vuv2 b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/vuv2
new file mode 120000
index 0000000..2abd9b7
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/systems/version2/run/etc/vuv2
@@ -0,0 +1 @@
+../../../../vu \ No newline at end of file
diff --git a/tests/bscs-merge.pass/symblinks.out/v1 b/tests/bscs-merge.pass/symblinks.out/v1
new file mode 100644
index 0000000..626799f
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/v1
@@ -0,0 +1 @@
+v1
diff --git a/tests/bscs-merge.pass/symblinks.out/v2 b/tests/bscs-merge.pass/symblinks.out/v2
new file mode 100644
index 0000000..8c1384d
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/v2
@@ -0,0 +1 @@
+v2
diff --git a/tests/bscs-merge.pass/symblinks.out/vu b/tests/bscs-merge.pass/symblinks.out/vu
new file mode 100644
index 0000000..4782f39
--- /dev/null
+++ b/tests/bscs-merge.pass/symblinks.out/vu
@@ -0,0 +1 @@
+vu
diff --git a/tests/bscs-merge.pass/upgrades.in/systems/default b/tests/bscs-merge.pass/upgrades.in/systems/default
new file mode 120000
index 0000000..0f51808
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.in/systems/default
@@ -0,0 +1 @@
+factory \ No newline at end of file
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file1 b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file1
index b73be5d..b73be5d 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file1
+++ b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file1
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file4 b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file4
index 9972a7a..9972a7a 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file4
+++ b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file4
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file5 b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file5
index 8fbeda2..8fbeda2 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file5
+++ b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file5
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file7 b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file7
index 7c1f4fb..7c1f4fb 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file7
+++ b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file7
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file7.1 b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file7.1
index d579e7b..d579e7b 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/file7.1
+++ b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/file7.1
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/subdir1/subfile1 b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/subdir1/subfile1
index 1cb075e..1cb075e 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v1/subdir1/subfile1
+++ b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/subdir1/subfile1
diff --git a/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/subdir1/subsubdir2/subsubfile4 b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/subdir1/subsubdir2/subsubfile4
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.in/systems/factory/orig/etc/subdir1/subsubdir2/subsubfile4
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file2 b/tests/bscs-merge.pass/upgrades.in/systems/factory/run/etc/file2
index 9fa9381..9fa9381 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file2
+++ b/tests/bscs-merge.pass/upgrades.in/systems/factory/run/etc/file2
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file5 b/tests/bscs-merge.pass/upgrades.in/systems/factory/run/etc/file5
index eddf4ca..eddf4ca 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file5
+++ b/tests/bscs-merge.pass/upgrades.in/systems/factory/run/etc/file5
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file6 b/tests/bscs-merge.pass/upgrades.in/systems/factory/run/etc/file6
index 9802a97..9802a97 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file6
+++ b/tests/bscs-merge.pass/upgrades.in/systems/factory/run/etc/file6
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file7 b/tests/bscs-merge.pass/upgrades.in/systems/factory/run/etc/file7
index 24553ad..24553ad 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/vu/file7
+++ b/tests/bscs-merge.pass/upgrades.in/systems/factory/run/etc/file7
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file3 b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file3
index b1580e3..b1580e3 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file3
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file3
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file4 b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file4
index ebc4914..ebc4914 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file4
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file4
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file6 b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file6
index e76efb0..e76efb0 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file6
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file6
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file7 b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file7
index 93c46eb..93c46eb 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file7
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file7
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file7.1 b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file7.1
index 2462a4f..2462a4f 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/file7.1
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/file7.1
diff --git a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/subdir1/subfile1 b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/subdir1/subfile1
index 1cb075e..1cb075e 100644
--- a/baserock-system-config-sync/config-sync-tests/tests.upgrades/v2/subdir1/subfile1
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/subdir1/subfile1
diff --git a/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/subdir1/subsubdir2/subsubfile4 b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/subdir1/subsubdir2/subsubfile4
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/orig/etc/subdir1/subsubdir2/subsubfile4
diff --git a/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file3 b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file3
new file mode 100644
index 0000000..b1580e3
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file3
@@ -0,0 +1,2 @@
+whereami=vu
+version=v2
diff --git a/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file4 b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file4
new file mode 100644
index 0000000..ebc4914
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file4
@@ -0,0 +1,2 @@
+whereami=v1,v2
+version=v2
diff --git a/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file6 b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file6
new file mode 100644
index 0000000..e76efb0
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file6
@@ -0,0 +1,2 @@
+whereami=vu,v2
+version=v2
diff --git a/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file7 b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file7
new file mode 100644
index 0000000..93c46eb
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file7
@@ -0,0 +1,2 @@
+whereami=v1,vu,v2
+version=v2
diff --git a/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file7.1 b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file7.1
new file mode 100644
index 0000000..2462a4f
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/file7.1
@@ -0,0 +1,8 @@
+a=1
+b=2
+c=3
+whereami=v1,vu,v2
+version=v2
+d=1
+e=2
+f=3
diff --git a/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/subdir1/subfile1 b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/subdir1/subfile1
new file mode 100644
index 0000000..1cb075e
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/subdir1/subfile1
@@ -0,0 +1,10 @@
+qeq asda d
+s
+d
+a sd
+a
+d
+a
+d
+
+d
diff --git a/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/subdir1/subsubdir2/subsubfile4 b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/subdir1/subsubdir2/subsubfile4
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.in/systems/version2/run/etc/subdir1/subsubdir2/subsubfile4
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/default b/tests/bscs-merge.pass/upgrades.out/systems/default
new file mode 120000
index 0000000..0f51808
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/default
@@ -0,0 +1 @@
+factory \ No newline at end of file
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file1 b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file1
new file mode 100644
index 0000000..b73be5d
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file1
@@ -0,0 +1,2 @@
+whereami=v1
+version=v1
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file4 b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file4
new file mode 100644
index 0000000..9972a7a
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file4
@@ -0,0 +1,2 @@
+whereami=v1,v2
+version=v1
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file5 b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file5
new file mode 100644
index 0000000..8fbeda2
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file5
@@ -0,0 +1,2 @@
+whereami=v1,vu
+version=v1
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file7 b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file7
new file mode 100644
index 0000000..7c1f4fb
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file7
@@ -0,0 +1,2 @@
+whereami=v1,vu,v2
+version=v1
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file7.1 b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file7.1
new file mode 100644
index 0000000..d579e7b
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/file7.1
@@ -0,0 +1,8 @@
+a=1
+b=2
+c=3
+whereami=v1,vu,v2
+version=v1
+d=1
+e=2
+f=3
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/subdir1/subfile1 b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/subdir1/subfile1
new file mode 100644
index 0000000..1cb075e
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/subdir1/subfile1
@@ -0,0 +1,10 @@
+qeq asda d
+s
+d
+a sd
+a
+d
+a
+d
+
+d
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/subdir1/subsubdir2/subsubfile4 b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/subdir1/subsubdir2/subsubfile4
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/factory/orig/etc/subdir1/subsubdir2/subsubfile4
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file2 b/tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file2
new file mode 100644
index 0000000..9fa9381
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file2
@@ -0,0 +1,2 @@
+whereami=vu
+version=vu
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file5 b/tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file5
new file mode 100644
index 0000000..eddf4ca
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file5
@@ -0,0 +1,2 @@
+whereami=v1,vu
+version=vu
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file6 b/tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file6
new file mode 100644
index 0000000..9802a97
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file6
@@ -0,0 +1,2 @@
+whereami=vu,v2
+version=vu
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file7 b/tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file7
new file mode 100644
index 0000000..24553ad
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/factory/run/etc/file7
@@ -0,0 +1,2 @@
+whereami=v1,vu,v2
+version=vu
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file3 b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file3
new file mode 100644
index 0000000..b1580e3
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file3
@@ -0,0 +1,2 @@
+whereami=vu
+version=v2
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file4 b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file4
new file mode 100644
index 0000000..ebc4914
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file4
@@ -0,0 +1,2 @@
+whereami=v1,v2
+version=v2
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file6 b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file6
new file mode 100644
index 0000000..e76efb0
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file6
@@ -0,0 +1,2 @@
+whereami=vu,v2
+version=v2
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file7 b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file7
new file mode 100644
index 0000000..93c46eb
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file7
@@ -0,0 +1,2 @@
+whereami=v1,vu,v2
+version=v2
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file7.1 b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file7.1
new file mode 100644
index 0000000..2462a4f
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/file7.1
@@ -0,0 +1,8 @@
+a=1
+b=2
+c=3
+whereami=v1,vu,v2
+version=v2
+d=1
+e=2
+f=3
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/subdir1/subfile1 b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/subdir1/subfile1
new file mode 100644
index 0000000..1cb075e
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/subdir1/subfile1
@@ -0,0 +1,10 @@
+qeq asda d
+s
+d
+a sd
+a
+d
+a
+d
+
+d
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/subdir1/subsubdir2/subsubfile4 b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/subdir1/subsubdir2/subsubfile4
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/orig/etc/subdir1/subsubdir2/subsubfile4
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file1 b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file1
new file mode 100644
index 0000000..b73be5d
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file1
@@ -0,0 +1,2 @@
+whereami=v1
+version=v1
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file2 b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file2
new file mode 100644
index 0000000..9fa9381
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file2
@@ -0,0 +1,2 @@
+whereami=vu
+version=vu
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file3 b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file3
new file mode 100644
index 0000000..b1580e3
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file3
@@ -0,0 +1,2 @@
+whereami=vu
+version=v2
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file4 b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file4
new file mode 100644
index 0000000..ebc4914
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file4
@@ -0,0 +1,2 @@
+whereami=v1,v2
+version=v2
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file5 b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file5
new file mode 100644
index 0000000..eddf4ca
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file5
@@ -0,0 +1,2 @@
+whereami=v1,vu
+version=vu
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file6 b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file6
new file mode 100644
index 0000000..9802a97
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file6
@@ -0,0 +1,2 @@
+whereami=vu,v2
+version=vu
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7 b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7
new file mode 100644
index 0000000..93c46eb
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7
@@ -0,0 +1,2 @@
+whereami=v1,vu,v2
+version=v2
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7.1 b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7.1
new file mode 100644
index 0000000..2462a4f
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7.1
@@ -0,0 +1,8 @@
+a=1
+b=2
+c=3
+whereami=v1,vu,v2
+version=v2
+d=1
+e=2
+f=3
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7.rej b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7.rej
new file mode 100644
index 0000000..13f6156
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/file7.rej
@@ -0,0 +1,6 @@
+--- file7
++++ file7
+@@ -1,2 +1,2 @@
+ whereami=v1,vu,v2
+-version=v1
++version=vu
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/subdir1/subfile1 b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/subdir1/subfile1
new file mode 100644
index 0000000..1cb075e
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/subdir1/subfile1
@@ -0,0 +1,10 @@
+qeq asda d
+s
+d
+a sd
+a
+d
+a
+d
+
+d
diff --git a/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/subdir1/subsubdir2/subsubfile4 b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/subdir1/subsubdir2/subsubfile4
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-merge.pass/upgrades.out/systems/version2/run/etc/subdir1/subsubdir2/subsubfile4
diff --git a/tests/bscs-sync.in/systems/default b/tests/bscs-sync.in/systems/default
new file mode 120000
index 0000000..0f51808
--- /dev/null
+++ b/tests/bscs-sync.in/systems/default
@@ -0,0 +1 @@
+factory \ No newline at end of file
diff --git a/tests/bscs-sync.in/systems/factory/orig/etc/config b/tests/bscs-sync.in/systems/factory/orig/etc/config
new file mode 120000
index 0000000..a3161f3
--- /dev/null
+++ b/tests/bscs-sync.in/systems/factory/orig/etc/config
@@ -0,0 +1 @@
+config1 \ No newline at end of file
diff --git a/tests/bscs-sync.in/systems/factory/orig/etc/config1 b/tests/bscs-sync.in/systems/factory/orig/etc/config1
new file mode 100644
index 0000000..639916d
--- /dev/null
+++ b/tests/bscs-sync.in/systems/factory/orig/etc/config1
@@ -0,0 +1,2 @@
+config1
+factory/orig
diff --git a/tests/bscs-sync.in/systems/factory/orig/etc/folder1/config2 b/tests/bscs-sync.in/systems/factory/orig/etc/folder1/config2
new file mode 100644
index 0000000..88ef2e3
--- /dev/null
+++ b/tests/bscs-sync.in/systems/factory/orig/etc/folder1/config2
@@ -0,0 +1,2 @@
+config2
+factory/orig
diff --git a/tests/bscs-sync.in/systems/factory/run/etc/config b/tests/bscs-sync.in/systems/factory/run/etc/config
new file mode 120000
index 0000000..a3161f3
--- /dev/null
+++ b/tests/bscs-sync.in/systems/factory/run/etc/config
@@ -0,0 +1 @@
+config1 \ No newline at end of file
diff --git a/tests/bscs-sync.in/systems/factory/run/etc/config1 b/tests/bscs-sync.in/systems/factory/run/etc/config1
new file mode 100644
index 0000000..5371fca
--- /dev/null
+++ b/tests/bscs-sync.in/systems/factory/run/etc/config1
@@ -0,0 +1,3 @@
+config1
+factory/orig
+user change!!
diff --git a/tests/bscs-sync.in/systems/factory/run/etc/folder1/config2 b/tests/bscs-sync.in/systems/factory/run/etc/folder1/config2
new file mode 100644
index 0000000..88ef2e3
--- /dev/null
+++ b/tests/bscs-sync.in/systems/factory/run/etc/folder1/config2
@@ -0,0 +1,2 @@
+config2
+factory/orig
diff --git a/tests/bscs-sync.in/systems/version2/orig/etc/config b/tests/bscs-sync.in/systems/version2/orig/etc/config
new file mode 120000
index 0000000..a3161f3
--- /dev/null
+++ b/tests/bscs-sync.in/systems/version2/orig/etc/config
@@ -0,0 +1 @@
+config1 \ No newline at end of file
diff --git a/tests/bscs-sync.in/systems/version2/orig/etc/config1 b/tests/bscs-sync.in/systems/version2/orig/etc/config1
new file mode 100644
index 0000000..639916d
--- /dev/null
+++ b/tests/bscs-sync.in/systems/version2/orig/etc/config1
@@ -0,0 +1,2 @@
+config1
+factory/orig
diff --git a/tests/bscs-sync.in/systems/version2/orig/etc/folder1/config2 b/tests/bscs-sync.in/systems/version2/orig/etc/folder1/config2
new file mode 100644
index 0000000..88ef2e3
--- /dev/null
+++ b/tests/bscs-sync.in/systems/version2/orig/etc/folder1/config2
@@ -0,0 +1,2 @@
+config2
+factory/orig
diff --git a/tests/bscs-sync.in/systems/version2/run/etc/config b/tests/bscs-sync.in/systems/version2/run/etc/config
new file mode 120000
index 0000000..a3161f3
--- /dev/null
+++ b/tests/bscs-sync.in/systems/version2/run/etc/config
@@ -0,0 +1 @@
+config1 \ No newline at end of file
diff --git a/tests/bscs-sync.in/systems/version2/run/etc/config1 b/tests/bscs-sync.in/systems/version2/run/etc/config1
new file mode 100644
index 0000000..5371fca
--- /dev/null
+++ b/tests/bscs-sync.in/systems/version2/run/etc/config1
@@ -0,0 +1,3 @@
+config1
+factory/orig
+user change!!
diff --git a/tests/bscs-sync.in/systems/version2/run/etc/folder1/config2 b/tests/bscs-sync.in/systems/version2/run/etc/folder1/config2
new file mode 100644
index 0000000..88ef2e3
--- /dev/null
+++ b/tests/bscs-sync.in/systems/version2/run/etc/folder1/config2
@@ -0,0 +1,2 @@
+config2
+factory/orig
diff --git a/tests/bscs-sync.in/systems/version2/run/etc/folder2/iamgoingbeoverwritten b/tests/bscs-sync.in/systems/version2/run/etc/folder2/iamgoingbeoverwritten
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/bscs-sync.in/systems/version2/run/etc/folder2/iamgoingbeoverwritten
diff --git a/tests/bscs-sync.in/systems/version3/orig/etc/config b/tests/bscs-sync.in/systems/version3/orig/etc/config
new file mode 120000
index 0000000..a3161f3
--- /dev/null
+++ b/tests/bscs-sync.in/systems/version3/orig/etc/config
@@ -0,0 +1 @@
+config1 \ No newline at end of file
diff --git a/tests/bscs-sync.in/systems/version3/orig/etc/config1 b/tests/bscs-sync.in/systems/version3/orig/etc/config1
new file mode 100644
index 0000000..639916d
--- /dev/null
+++ b/tests/bscs-sync.in/systems/version3/orig/etc/config1
@@ -0,0 +1,2 @@
+config1
+factory/orig
diff --git a/tests/bscs-sync.in/systems/version3/orig/etc/folder1/config2 b/tests/bscs-sync.in/systems/version3/orig/etc/folder1/config2
new file mode 100644
index 0000000..88ef2e3
--- /dev/null
+++ b/tests/bscs-sync.in/systems/version3/orig/etc/folder1/config2
@@ -0,0 +1,2 @@
+config2
+factory/orig
diff --git a/tests/bscs-sync.in/systems/version3/run/etc/config b/tests/bscs-sync.in/systems/version3/run/etc/config
new file mode 120000
index 0000000..9211844
--- /dev/null
+++ b/tests/bscs-sync.in/systems/version3/run/etc/config
@@ -0,0 +1 @@
+folder1/config2 \ No newline at end of file
diff --git a/tests/bscs-sync.in/systems/version3/run/etc/config1 b/tests/bscs-sync.in/systems/version3/run/etc/config1
new file mode 100644
index 0000000..5371fca
--- /dev/null
+++ b/tests/bscs-sync.in/systems/version3/run/etc/config1
@@ -0,0 +1,3 @@
+config1
+factory/orig
+user change!!
diff --git a/tests/bscs-sync.in/systems/version3/run/etc/folder1/config2 b/tests/bscs-sync.in/systems/version3/run/etc/folder1/config2
new file mode 100644
index 0000000..88ef2e3
--- /dev/null
+++ b/tests/bscs-sync.in/systems/version3/run/etc/folder1/config2
@@ -0,0 +1,2 @@
+config2
+factory/orig
diff --git a/tests/bscs-sync.out/systems/default b/tests/bscs-sync.out/systems/default
new file mode 120000
index 0000000..0f51808
--- /dev/null
+++ b/tests/bscs-sync.out/systems/default
@@ -0,0 +1 @@
+factory \ No newline at end of file
diff --git a/tests/bscs-sync.out/systems/factory/orig/etc/config b/tests/bscs-sync.out/systems/factory/orig/etc/config
new file mode 120000
index 0000000..a3161f3
--- /dev/null
+++ b/tests/bscs-sync.out/systems/factory/orig/etc/config
@@ -0,0 +1 @@
+config1 \ No newline at end of file
diff --git a/tests/bscs-sync.out/systems/factory/orig/etc/config1 b/tests/bscs-sync.out/systems/factory/orig/etc/config1
new file mode 100644
index 0000000..639916d
--- /dev/null
+++ b/tests/bscs-sync.out/systems/factory/orig/etc/config1
@@ -0,0 +1,2 @@
+config1
+factory/orig
diff --git a/tests/bscs-sync.out/systems/factory/orig/etc/folder1/config2 b/tests/bscs-sync.out/systems/factory/orig/etc/folder1/config2
new file mode 100644
index 0000000..88ef2e3
--- /dev/null
+++ b/tests/bscs-sync.out/systems/factory/orig/etc/folder1/config2
@@ -0,0 +1,2 @@
+config2
+factory/orig
diff --git a/tests/bscs-sync.out/systems/factory/run/etc/config b/tests/bscs-sync.out/systems/factory/run/etc/config
new file mode 120000
index 0000000..9211844
--- /dev/null
+++ b/tests/bscs-sync.out/systems/factory/run/etc/config
@@ -0,0 +1 @@
+folder1/config2 \ No newline at end of file
diff --git a/tests/bscs-sync.out/systems/factory/run/etc/config1 b/tests/bscs-sync.out/systems/factory/run/etc/config1
new file mode 100644
index 0000000..5371fca
--- /dev/null
+++ b/tests/bscs-sync.out/systems/factory/run/etc/config1
@@ -0,0 +1,3 @@
+config1
+factory/orig
+user change!!
diff --git a/tests/bscs-sync.out/systems/factory/run/etc/folder1/config2 b/tests/bscs-sync.out/systems/factory/run/etc/folder1/config2
new file mode 100644
index 0000000..88ef2e3
--- /dev/null
+++ b/tests/bscs-sync.out/systems/factory/run/etc/folder1/config2
@@ -0,0 +1,2 @@
+config2
+factory/orig
diff --git a/tests/bscs-sync.out/systems/version2/orig/etc/config b/tests/bscs-sync.out/systems/version2/orig/etc/config
new file mode 120000
index 0000000..a3161f3
--- /dev/null
+++ b/tests/bscs-sync.out/systems/version2/orig/etc/config
@@ -0,0 +1 @@
+config1 \ No newline at end of file
diff --git a/tests/bscs-sync.out/systems/version2/orig/etc/config1 b/tests/bscs-sync.out/systems/version2/orig/etc/config1
new file mode 100644
index 0000000..639916d
--- /dev/null
+++ b/tests/bscs-sync.out/systems/version2/orig/etc/config1
@@ -0,0 +1,2 @@
+config1
+factory/orig
diff --git a/tests/bscs-sync.out/systems/version2/orig/etc/folder1/config2 b/tests/bscs-sync.out/systems/version2/orig/etc/folder1/config2
new file mode 100644
index 0000000..88ef2e3
--- /dev/null
+++ b/tests/bscs-sync.out/systems/version2/orig/etc/folder1/config2
@@ -0,0 +1,2 @@
+config2
+factory/orig
diff --git a/tests/bscs-sync.out/systems/version2/run/etc/config b/tests/bscs-sync.out/systems/version2/run/etc/config
new file mode 120000
index 0000000..9211844
--- /dev/null
+++ b/tests/bscs-sync.out/systems/version2/run/etc/config
@@ -0,0 +1 @@
+folder1/config2 \ No newline at end of file
diff --git a/tests/bscs-sync.out/systems/version2/run/etc/config1 b/tests/bscs-sync.out/systems/version2/run/etc/config1
new file mode 100644
index 0000000..5371fca
--- /dev/null
+++ b/tests/bscs-sync.out/systems/version2/run/etc/config1
@@ -0,0 +1,3 @@
+config1
+factory/orig
+user change!!
diff --git a/tests/bscs-sync.out/systems/version2/run/etc/folder1/config2 b/tests/bscs-sync.out/systems/version2/run/etc/folder1/config2
new file mode 100644
index 0000000..88ef2e3
--- /dev/null
+++ b/tests/bscs-sync.out/systems/version2/run/etc/folder1/config2
@@ -0,0 +1,2 @@
+config2
+factory/orig
diff --git a/tests/bscs-sync.out/systems/version3/orig/etc/config b/tests/bscs-sync.out/systems/version3/orig/etc/config
new file mode 120000
index 0000000..a3161f3
--- /dev/null
+++ b/tests/bscs-sync.out/systems/version3/orig/etc/config
@@ -0,0 +1 @@
+config1 \ No newline at end of file
diff --git a/tests/bscs-sync.out/systems/version3/orig/etc/config1 b/tests/bscs-sync.out/systems/version3/orig/etc/config1
new file mode 100644
index 0000000..639916d
--- /dev/null
+++ b/tests/bscs-sync.out/systems/version3/orig/etc/config1
@@ -0,0 +1,2 @@
+config1
+factory/orig
diff --git a/tests/bscs-sync.out/systems/version3/orig/etc/folder1/config2 b/tests/bscs-sync.out/systems/version3/orig/etc/folder1/config2
new file mode 100644
index 0000000..88ef2e3
--- /dev/null
+++ b/tests/bscs-sync.out/systems/version3/orig/etc/folder1/config2
@@ -0,0 +1,2 @@
+config2
+factory/orig
diff --git a/tests/bscs-sync.out/systems/version3/run/etc/config b/tests/bscs-sync.out/systems/version3/run/etc/config
new file mode 120000
index 0000000..9211844
--- /dev/null
+++ b/tests/bscs-sync.out/systems/version3/run/etc/config
@@ -0,0 +1 @@
+folder1/config2 \ No newline at end of file
diff --git a/tests/bscs-sync.out/systems/version3/run/etc/config1 b/tests/bscs-sync.out/systems/version3/run/etc/config1
new file mode 100644
index 0000000..5371fca
--- /dev/null
+++ b/tests/bscs-sync.out/systems/version3/run/etc/config1
@@ -0,0 +1,3 @@
+config1
+factory/orig
+user change!!
diff --git a/tests/bscs-sync.out/systems/version3/run/etc/folder1/config2 b/tests/bscs-sync.out/systems/version3/run/etc/folder1/config2
new file mode 100644
index 0000000..88ef2e3
--- /dev/null
+++ b/tests/bscs-sync.out/systems/version3/run/etc/folder1/config2
@@ -0,0 +1,2 @@
+config2
+factory/orig
diff --git a/tests/fake_mounting_script.sh b/tests/fake_mounting_script.sh
new file mode 100755
index 0000000..4bb95f6
--- /dev/null
+++ b/tests/fake_mounting_script.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Copyright (c) 2013 Codethink Ltd.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License Version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+set -eu
+
+
+usage() {
+ echo usage: "$(basename $0) fake_mounting_point" >&2
+ exit 1
+}
+
+
+
+if [ "$#" != 1 ]; then
+ usage $0
+fi
+
+
+fake_mounting_point="$1"
+
+cp -a "$mounting_script_test_dir"/* "$fake_mounting_point"
+
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 21df2b2..6fa2f29 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -18,7 +18,7 @@ for i in [0-9][0-9]*.sh
do
cd $ALLTESTSDIR
echo "#### Running $i"
- fakeroot -- ./$i ../tbdiff-create/tbdiff-create ../tbdiff-deploy/tbdiff-deploy
+ ./$i ../tbdiff-create/tbdiff-create ../tbdiff-deploy/tbdiff-deploy
if [ $? -ne 0 ]
then
echo "Test program $i failed" 1>&2
@@ -28,3 +28,73 @@ do
fi
echo "#####################################################################"
done
+
+
+echo "Starting baserock-system-config-sync tests"
+merge_pass_folder="bscs-merge.pass"
+merge_fail_folder="bscs-merge.fail"
+sync_folder="bscs-sync"
+bscs_script="../baserock-system-config-sync/baserock-system-config-sync"
+bscs_log="bscs.log"
+> "$bscs_log"
+
+# test merge cases that should succeed
+for folder in "$merge_pass_folder/"*.in; do
+ echo -n "#### Running ${folder%.in}"
+ echo "#### Running ${folder%.in}" >> "$bscs_log"
+ out_folder=${folder%.in}.out
+ TMPDIR=$(mktemp -d)
+ TMPDIR=$TMPDIR mounting_script="./fake_mounting_script.sh" unmount=true \
+ mounting_script_test_dir="$folder" "$bscs_script" "merge" \
+ "version2" &>> "$bscs_log"
+ exit_code="$?"
+ if [ "$exit_code" -ne 0 ]; then
+ echo ": FAILED (exit code "$exit_code")" 1>&2
+ exit 1
+ elif ! diff -r "$TMPDIR/"*/ "$out_folder/" &>> "$bscs_log"; then
+ echo ": FAILED (different diff)" 1>&2
+ exit 1
+ else
+ echo ": OK" 1>&2
+ fi
+ rm -rf $TMPDIR
+done
+
+
+# test merge changes that should fail
+for folder in "$merge_fail_folder/"*.in; do
+ echo -n "#### Running ${folder%.in}"
+ echo "#### Running ${folder%.in}" >> "$bscs_log"
+ TMPDIR=$(mktemp -d)
+ TMPDIR=$TMPDIR mounting_script="./fake_mounting_script.sh" unmount=true \
+ mounting_script_test_dir="$folder" "$bscs_script" "merge" \
+ "version2" &>> "$bscs_log"
+ if [ $? -eq 0 ]; then
+ echo ": FAILED" 1>&2
+ exit 1
+ else
+ echo ": OK" 1>&2
+ fi
+ rm -rf $TMPDIR
+done
+
+
+# test the sync mode
+echo -n "#### Running sync test on $sync_folder"
+echo "#### Running sync test on $sync_folder" >> "$bscs_log"
+out_folder=${sync_folder}.out
+TMPDIR=$(mktemp -d)
+TMPDIR=$TMPDIR mounting_script="./fake_mounting_script.sh" unmount=true \
+ mounting_script_test_dir="${sync_folder}.in" "$bscs_script" "sync" \
+ "version3" &>> "$bscs_log"
+exit_code="$?"
+if [ "$exit_code" -ne 0 ]; then
+ echo ": FAILED (exit code "$exit_code")" 1>&2
+ exit 1
+elif ! diff -r "$TMPDIR/"*/ "$out_folder/" &>> "$bscs_log"; then
+ echo ": FAILED (different diff)" 1>&2a
+ exit 1
+else
+ echo ": OK" 1>&2
+fi
+rm -rf $TMPDIR