mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-09-03 04:01:34 +00:00
Replacing old update and verify tests
The old update and verify tests used the swupdlib.bash library that was replaced by testlib.bash. This commit replaces those old update and verify tests with new versions of the same tests that now use testlib. Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit is contained in:
committed by
Otavio Pontes
parent
d354652d24
commit
ecc8fc562e
+52
-52
@@ -158,58 +158,58 @@ BATS = \
|
||||
test/functional/search/search-content-check-negative.bats \
|
||||
test/functional/search/search-content-check-positive.bats \
|
||||
test/functional/search/search-client-certificate.bats \
|
||||
test/functional/update/apply-full-file-delta/test.bats \
|
||||
test/functional/update/boot-file/test.bats \
|
||||
test/functional/update/boot-skip/test.bats \
|
||||
test/functional/update/delta-without-rename-flag/test.bats \
|
||||
test/functional/update/download/test.bats \
|
||||
test/functional/update/include/test.bats \
|
||||
test/functional/update/include-old-bundle/test.bats \
|
||||
test/functional/update/include-old-bundle-with-tracked-file/test.bats \
|
||||
test/functional/update/missing-os-core/test.bats \
|
||||
test/functional/update/newest-deleted/test.bats \
|
||||
test/functional/update/newest-ghosted/test.bats \
|
||||
test/functional/update/rename/test.bats \
|
||||
test/functional/update/rename-ghosted/test.bats \
|
||||
test/functional/update/skip-scripts/test.bats \
|
||||
test/functional/update/skip-verified-fullfiles/test.bats \
|
||||
test/functional/update/status/test.bats \
|
||||
test/functional/update/status-no-server-content/test.bats \
|
||||
test/functional/update/status-no-target-content/test.bats \
|
||||
test/functional/update/status-version-double-quote/test.bats \
|
||||
test/functional/update/status-version-single-quote/test.bats \
|
||||
test/functional/update/use-full-file/test.bats \
|
||||
test/functional/update/use-pack/test.bats \
|
||||
test/functional/update/verify-fix-path-hash-mismatch/test.bats \
|
||||
test/functional/update/verify-fix-path-missing-dir/test.bats \
|
||||
test/functional/update/verify-fullfile-hash/test.bats \
|
||||
test/functional/update/re-update-required/test.bats \
|
||||
test/functional/update/re-update-bad-os-release/test.bats \
|
||||
test/functional/update/slow-server/test.bats \
|
||||
test/functional/update/statedir-bad-hash/test.bats \
|
||||
test/functional/update_v2/update-client-certificate.bats \
|
||||
test/functional/verify/add-missing-directory/test.bats \
|
||||
test/functional/verify/add-missing-include/test.bats \
|
||||
test/functional/verify/add-missing-include-old/test.bats \
|
||||
test/functional/verify/boot-file-deleted/test.bats \
|
||||
test/functional/verify/boot-file-mismatch/test.bats \
|
||||
test/functional/verify/boot-file-mismatch-fix/test.bats \
|
||||
test/functional/verify/boot-skip/test.bats \
|
||||
test/functional/verify/check-missing-directory/test.bats \
|
||||
test/functional/verify/directory-tree-deleted/test.bats \
|
||||
test/functional/verify/empty-dir-deleted/test.bats \
|
||||
test/functional/verify/fix-version-mismatch/test.bats \
|
||||
test/functional/verify/fix-version-mismatch-override/test.bats \
|
||||
test/functional/verify/format-mismatch/test.bats \
|
||||
test/functional/verify/format-mismatch-override/test.bats \
|
||||
test/functional/verify/ghosted/test.bats \
|
||||
test/functional/verify/install-directory/test.bats \
|
||||
test/functional/verify/install-latest-directory/test.bats \
|
||||
test/functional/verify/latest-missing/test.bats \
|
||||
test/functional/verify/picky-ghosted/test.bats \
|
||||
test/functional/verify/picky-ghosted-missing/test.bats \
|
||||
test/functional/verify/skip-scripts/test.bats \
|
||||
test/functional/verify_v2/verify-client-certificate.bats
|
||||
test/functional/update/update-apply-full-file-delta.bats \
|
||||
test/functional/update/update-boot-file.bats \
|
||||
test/functional/update/update-boot-skip.bats \
|
||||
test/functional/update/update-client-certificate.bats \
|
||||
test/functional/update/update-delta-without-rename-flag.bats \
|
||||
test/functional/update/update-download.bats \
|
||||
test/functional/update/update-include.bats \
|
||||
test/functional/update/update-include-old-bundle.bats \
|
||||
test/functional/update/update-include-old-bundle-with-tracked-file.bats \
|
||||
test/functional/update/update-missing-os-core.bats \
|
||||
test/functional/update/update-newest-deleted.bats \
|
||||
test/functional/update/update-newest-ghosted.bats \
|
||||
test/functional/update/update-rename.bats \
|
||||
test/functional/update/update-rename-ghosted.bats \
|
||||
test/functional/update/update-re-update-bad-os-release.bats \
|
||||
test/functional/update/update-re-update-required.bats \
|
||||
test/functional/update/update-skip-scripts.bats \
|
||||
test/functional/update/update-skip-verified-fullfiles.bats \
|
||||
test/functional/update/update-slow-server.bats \
|
||||
test/functional/update/update-statedir-bad-hash.bats \
|
||||
test/functional/update/update-status.bats \
|
||||
test/functional/update/update-status-no-server-content.bats \
|
||||
test/functional/update/update-status-no-target-content.bats \
|
||||
test/functional/update/update-status-version-double-quote.bats \
|
||||
test/functional/update/update-status-version-single-quote.bats \
|
||||
test/functional/update/update-use-full-file.bats \
|
||||
test/functional/update/update-use-pack.bats \
|
||||
test/functional/update/update-verify-fix-path-hash-mismatch.bats \
|
||||
test/functional/update/update-verify-fix-path-missing-dir.bats \
|
||||
test/functional/update/update-verify-fullfile-hash.bats \
|
||||
test/functional/verify/verify-add-missing-directory.bats \
|
||||
test/functional/verify/verify-add-missing-include.bats \
|
||||
test/functional/verify/verify-add-missing-include-old.bats \
|
||||
test/functional/verify/verify-boot-file-deleted.bats \
|
||||
test/functional/verify/verify-boot-file-mismatch.bats \
|
||||
test/functional/verify/verify-boot-file-mismatch-fix.bats \
|
||||
test/functional/verify/verify-boot-skip.bats \
|
||||
test/functional/verify/verify-check-missing-directory.bats \
|
||||
test/functional/verify/verify-client-certificate.bats
|
||||
test/functional/verify/verify-directory-tree-deleted.bats \
|
||||
test/functional/verify/verify-empty-dir-deleted.bats \
|
||||
test/functional/verify/verify-fix-version-mismatch.bats \
|
||||
test/functional/verify/verify-fix-version-mismatch-override.bats \
|
||||
test/functional/verify/verify-format-mismatch.bats \
|
||||
test/functional/verify/verify-format-mismatch-override.bats \
|
||||
test/functional/verify/verify-ghosted.bats \
|
||||
test/functional/verify/verify-install-directory.bats \
|
||||
test/functional/verify/verify-install-latest-directory.bats \
|
||||
test/functional/verify/verify-latest-missing.bats \
|
||||
test/functional/verify/verify-picky-ghosted.bats \
|
||||
test/functional/verify/verify-picky-ghosted-missing.bats \
|
||||
test/functional/verify/verify-skip-scripts.bats
|
||||
|
||||
dist_check_SCRIPTS = $(BATS)
|
||||
# Must be run before all other tests
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
Update started.
|
||||
Preparing to update from 10 to 100
|
||||
Extracting os-core pack for version 100
|
||||
Statistics for going from version 10 to version 100:
|
||||
changed bundles : 1
|
||||
new bundles : 0
|
||||
deleted bundles : 0
|
||||
changed files : 1
|
||||
new files : 0
|
||||
deleted files : 0
|
||||
Starting download of remaining update content. This may take a while...
|
||||
Finishing download of update content...
|
||||
Staging file content
|
||||
Applying update
|
||||
Update was applied.
|
||||
Update successful. System updated from version 10 to version 100
|
||||
@@ -1 +0,0 @@
|
||||
VERSION_ID=10
|
||||
@@ -1,42 +0,0 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load "../../swupdlib"
|
||||
|
||||
deltafile="10-100-0832c0c7fb9d05ac3088a493f430e81044a0fc03f81cba9eb89d3b7816ef3962-9f83d713da9df6cabd2abc9d9061f9b611a207e1e0dd22ed7a071ddb1cc1537a"
|
||||
|
||||
setup() {
|
||||
clean_test_dir
|
||||
create_manifest_tar 10 MoM
|
||||
sign_manifest_mom 10
|
||||
create_manifest_tar 10 os-core
|
||||
create_manifest_tar 100 MoM
|
||||
sign_manifest_mom 100
|
||||
create_manifest_tar 100 os-core
|
||||
chown_root "$DIR/web-dir/100/delta/$deltafile"
|
||||
cp "$DIR/web-dir/10/staged/0832c0c7fb9d05ac3088a493f430e81044a0fc03f81cba9eb89d3b7816ef3962" "$DIR/target-dir/testfile"
|
||||
chown_root "$DIR/target-dir/testfile"
|
||||
mkdir -p "$DIR/web-dir/100/staged"
|
||||
tar -C "$DIR/web-dir/100" -cf "$DIR/web-dir/100/pack-os-core-from-10.tar" delta/$deltafile staged/
|
||||
}
|
||||
|
||||
teardown() {
|
||||
clean_tars 10
|
||||
clean_tars 100
|
||||
rmdir "$DIR/web-dir/100/staged"
|
||||
revert_chown_root "$DIR/web-dir/100/delta/$deltafile"
|
||||
sudo rm "$DIR/target-dir/testfile"
|
||||
}
|
||||
|
||||
@test "update use delta pack" {
|
||||
run sudo sh -c "$SWUPD update $SWUPD_OPTS"
|
||||
|
||||
check_lines "$output"
|
||||
|
||||
run sudo sh -c "$SWUPD hashdump $DIR/target-dir/testfile"
|
||||
|
||||
[ "$status" -eq 0 ]
|
||||
echo "$output"
|
||||
[ "${lines[1]}" = "9f83d713da9df6cabd2abc9d9061f9b611a207e1e0dd22ed7a071ddb1cc1537a" ]
|
||||
}
|
||||
|
||||
# vi: ft=sh ts=8 sw=2 sts=2 et tw=80
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... dbdba26e0552fdd75b5775fe6c08bae44ea2f73d6b039b598e8a031a14ab90cc 10 os-core
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
|
||||
F... 0832c0c7fb9d05ac3088a493f430e81044a0fc03f81cba9eb89d3b7816ef3962 10 /testfile
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
orig content
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 100
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... 6eb0e7f63e37d7d7bb4da5373f470fba55abd13030b8a4251a0bfbe4f84a20c9 100 os-core
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 100
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
|
||||
F... 9f83d713da9df6cabd2abc9d9061f9b611a207e1e0dd22ed7a071ddb1cc1537a 100 /testfile
|
||||
BIN
Binary file not shown.
@@ -1 +0,0 @@
|
||||
100
|
||||
@@ -1,16 +0,0 @@
|
||||
Update started.
|
||||
Preparing to update from 10 to 100
|
||||
Statistics for going from version 10 to version 100:
|
||||
changed bundles : 1
|
||||
new bundles : 0
|
||||
deleted bundles : 0
|
||||
changed files : 0
|
||||
new files : 1
|
||||
deleted files : 0
|
||||
Starting download of remaining update content. This may take a while...
|
||||
Finishing download of update content...
|
||||
Staging file content
|
||||
Applying update
|
||||
Update was applied.
|
||||
1 files were not in a pack
|
||||
Update successful. System updated from version 10 to version 100
|
||||
@@ -1,4 +0,0 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
||||
@@ -1,9 +0,0 @@
|
||||
NAME="Clear Linux Software for Intel Architecture"
|
||||
VERSION=1
|
||||
ID=clear-linux-os
|
||||
VERSION_ID=10
|
||||
PRETTY_NAME="Clear Linux Software for Intel Architecture"
|
||||
ANSI_COLOR="1;35"
|
||||
HOME_URL="https://clearlinux.org"
|
||||
SUPPORT_URL="https://clearlinux.org"
|
||||
BUG_REPORT_URL="https://bugs.clearlinux.org/jira"
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load "../../swupdlib"
|
||||
|
||||
targetfile=e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3
|
||||
|
||||
setup() {
|
||||
clean_test_dir
|
||||
create_manifest_tar 10 MoM
|
||||
sign_manifest_mom 10
|
||||
create_manifest_tar 10 os-core
|
||||
create_manifest_tar 100 MoM
|
||||
sign_manifest_mom 100
|
||||
create_manifest_tar 100 os-core
|
||||
create_fullfile_tar 100 $targetfile
|
||||
}
|
||||
|
||||
teardown() {
|
||||
clean_tars 10
|
||||
clean_tars 100
|
||||
clean_tars 100 files
|
||||
revert_chown_root "$DIR/web-dir/100/files/$targetfile"
|
||||
sudo rm "$DIR/target-dir/usr/lib/kernel/testfile"
|
||||
}
|
||||
|
||||
@test "update add boot file" {
|
||||
run sudo sh -c "$SWUPD update $SWUPD_OPTS"
|
||||
|
||||
[ "$status" -eq 0 ]
|
||||
check_lines "$output"
|
||||
[ -f "$DIR/target-dir/usr/lib/kernel/testfile" ]
|
||||
}
|
||||
|
||||
# vi: ft=sh ts=8 sw=2 sts=2 et tw=80
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... 0f026bc0017b676ad1eed7db682408007171cc1c148c39c069f91d740be784d7 10 os-core
|
||||
@@ -1,14 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 7
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
|
||||
D... cde33514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr
|
||||
D... dde33514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/lib
|
||||
D... ede33514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/lib/kernel
|
||||
D... cde13514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/share
|
||||
D... cde23514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/share/clear
|
||||
D... cde43514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/share/clear/bundles
|
||||
F... b85f1dc2c2317a20f47a36d3257313b131124ffa6d4f19bb060d43014fd386b0 10 /usr/share/clear/bundles/os-core
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 100
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... c371f1aa2b5396f4a9f3296acad579ae314d81b0e5bf783e949f88968fa0f39d 100 os-core
|
||||
@@ -1,15 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 100
|
||||
previous: 10
|
||||
filecount: 8
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
|
||||
D... cde33514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr
|
||||
D... dde33514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/lib
|
||||
D... ede33514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/lib/kernel
|
||||
D... cde13514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/share
|
||||
D... cde23514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/share/clear
|
||||
D... cde43514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/share/clear/bundles
|
||||
F... b85f1dc2c2317a20f47a36d3257313b131124ffa6d4f19bb060d43014fd386b0 10 /usr/share/clear/bundles/os-core
|
||||
F.b. e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 100 /usr/lib/kernel/testfile
|
||||
-1
@@ -1 +0,0 @@
|
||||
test boot file
|
||||
@@ -1 +0,0 @@
|
||||
100
|
||||
@@ -1,17 +0,0 @@
|
||||
Update started.
|
||||
Preparing to update from 10 to 100
|
||||
Statistics for going from version 10 to version 100:
|
||||
changed bundles : 1
|
||||
new bundles : 0
|
||||
deleted bundles : 0
|
||||
changed files : 0
|
||||
new files : 1
|
||||
deleted files : 0
|
||||
Starting download of remaining update content. This may take a while...
|
||||
Finishing download of update content...
|
||||
Staging file content
|
||||
Applying update
|
||||
Update was applied.
|
||||
WARNING: boot files update skipped due to --no-boot-update argument
|
||||
1 files were not in a pack
|
||||
Update successful. System updated from version 10 to version 100
|
||||
@@ -1,4 +0,0 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
||||
@@ -1,9 +0,0 @@
|
||||
NAME="Clear Linux Software for Intel Architecture"
|
||||
VERSION=1
|
||||
ID=clear-linux-os
|
||||
VERSION_ID=10
|
||||
PRETTY_NAME="Clear Linux Software for Intel Architecture"
|
||||
ANSI_COLOR="1;35"
|
||||
HOME_URL="https://clearlinux.org"
|
||||
SUPPORT_URL="https://clearlinux.org"
|
||||
BUG_REPORT_URL="https://bugs.clearlinux.org/jira"
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load "../../swupdlib"
|
||||
|
||||
targetfile=e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3
|
||||
|
||||
setup() {
|
||||
clean_test_dir
|
||||
create_manifest_tar 10 MoM
|
||||
sign_manifest_mom 10
|
||||
create_manifest_tar 10 os-core
|
||||
create_manifest_tar 100 MoM
|
||||
sign_manifest_mom 100
|
||||
create_manifest_tar 100 os-core
|
||||
create_fullfile_tar 100 $targetfile
|
||||
}
|
||||
|
||||
teardown() {
|
||||
clean_tars 10
|
||||
clean_tars 100
|
||||
clean_tars 100 files
|
||||
revert_chown_root "$DIR/web-dir/100/files/$targetfile"
|
||||
sudo rm "$DIR/target-dir/usr/lib/kernel/testfile"
|
||||
}
|
||||
|
||||
@test "update add boot file with --no-boot-update" {
|
||||
run sudo sh -c "$SWUPD update -b $SWUPD_OPTS"
|
||||
|
||||
[ "$status" -eq 0 ]
|
||||
check_lines "$output"
|
||||
[ -f "$DIR/target-dir/usr/lib/kernel/testfile" ]
|
||||
}
|
||||
|
||||
# vi: ft=sh ts=8 sw=2 sts=2 et tw=80
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... 0f026bc0017b676ad1eed7db682408007171cc1c148c39c069f91d740be784d7 10 os-core
|
||||
@@ -1,14 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 7
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
|
||||
D... cde33514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr
|
||||
D... dde33514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/lib
|
||||
D... ede33514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/lib/kernel
|
||||
D... cde13514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/share
|
||||
D... cde23514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/share/clear
|
||||
D... cde43514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/share/clear/bundles
|
||||
F... b85f1dc2c2317a20f47a36d3257313b131124ffa6d4f19bb060d43014fd386b0 10 /usr/share/clear/bundles/os-core
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 100
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... c371f1aa2b5396f4a9f3296acad579ae314d81b0e5bf783e949f88968fa0f39d 100 os-core
|
||||
@@ -1,15 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 100
|
||||
previous: 10
|
||||
filecount: 8
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
|
||||
D... cde33514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr
|
||||
D... dde33514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/lib
|
||||
D... ede33514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/lib/kernel
|
||||
D... cde13514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/share
|
||||
D... cde23514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/share/clear
|
||||
D... cde43514c151abb2b01448be290ab1d5212952571d15e3533cadc15ff82f2cd5 10 /usr/share/clear/bundles
|
||||
F... b85f1dc2c2317a20f47a36d3257313b131124ffa6d4f19bb060d43014fd386b0 10 /usr/share/clear/bundles/os-core
|
||||
F.b. e6d85023c5e619eb43d5cfbfdbdec784afef5a82ffa54e8c93bda3e0883360a3 100 /usr/lib/kernel/testfile
|
||||
-1
@@ -1 +0,0 @@
|
||||
test boot file
|
||||
@@ -1 +0,0 @@
|
||||
100
|
||||
@@ -1 +0,0 @@
|
||||
target-dir/
|
||||
@@ -1,16 +0,0 @@
|
||||
Update started.
|
||||
Preparing to update from 10 to 20
|
||||
Extracting os-core pack for version 20
|
||||
Statistics for going from version 10 to version 20:
|
||||
changed bundles : 1
|
||||
new bundles : 0
|
||||
deleted bundles : 0
|
||||
changed files : 1
|
||||
new files : 2
|
||||
deleted files : 2
|
||||
Starting download of remaining update content. This may take a while...
|
||||
Finishing download of update content...
|
||||
Staging file content
|
||||
Applying update
|
||||
Update was applied.
|
||||
Update successful. System updated from version 10 to version 20
|
||||
@@ -1,41 +0,0 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load "../../swupdlib"
|
||||
|
||||
setup() {
|
||||
clean_state_dir
|
||||
clean_target_dir
|
||||
create_manifest_tar 10 MoM
|
||||
sign_manifest_mom 10
|
||||
create_manifest_tar 10 os-core
|
||||
create_manifest_tar 20 MoM
|
||||
sign_manifest_mom 20
|
||||
create_manifest_tar 20 os-core
|
||||
set_os_release 10
|
||||
chown_root -R "$DIR/target-dir" "$DIR/web-dir"
|
||||
unpack_target_from_manifest 10 MoM
|
||||
unpack_target_from_manifest 10 os-core
|
||||
sudo tar -C "$DIR/web-dir/20" -cf "$DIR/web-dir/20/pack-os-core-from-10.tar" delta/ staged/
|
||||
}
|
||||
|
||||
teardown() {
|
||||
clean_tars 10
|
||||
clean_tars 20
|
||||
revert_chown_root -R "$DIR/target-dir"
|
||||
revert_chown_root -R "$DIR/web-dir"
|
||||
}
|
||||
|
||||
@test "using delta without a rename flag in the manifest" {
|
||||
run sudo sh -c "$SWUPD update $SWUPD_OPTS"
|
||||
|
||||
[ "$status" -eq 0 ]
|
||||
check_lines "$output"
|
||||
|
||||
[ -e "$DIR/target-dir/bar" ]
|
||||
[ ! -e "$DIR/target-dir/foo" ]
|
||||
[ -e "$DIR/target-dir/bat" ]
|
||||
[ ! -e "$DIR/target-dir/baz" ]
|
||||
|
||||
}
|
||||
|
||||
# vi: ft=sh ts=8 sw=2 sts=2 et tw=80
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1505693993
|
||||
contentsize: 5722
|
||||
|
||||
M... d904b539bd1b18baf1309146e780f952851052203c1fef338b860ec0a47ac614 10 os-core
|
||||
@@ -1,17 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 9
|
||||
timestamp: 1505693993
|
||||
contentsize: 5722
|
||||
status: ACTIVE
|
||||
|
||||
F... fdfec2695a18d214f80ef9fa6edde7b9fd64312b6be61f73429c39389e1d1334 10 /baz
|
||||
F... 0c00735e7bf78ac9063de74a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 10 /foo
|
||||
D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr
|
||||
D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/lib
|
||||
F... e6b5b316f2b470fc5d7a22caf4e7f6c8384a26ac8aacd80ccde5a6bd3838e87f 10 /usr/lib/os-release
|
||||
D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/share
|
||||
D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/share/clear
|
||||
D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/share/clear/bundles
|
||||
F... 28cb7c6cad23920f344157f48ae353caca34e9a2f5cff934a4fdaaf7509f2062 10 /usr/share/clear/bundles/os-core
|
||||
-100
@@ -1,100 +0,0 @@
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48
|
||||
49
|
||||
50
|
||||
51
|
||||
52
|
||||
53
|
||||
54
|
||||
55
|
||||
56
|
||||
57
|
||||
58
|
||||
59
|
||||
60
|
||||
61
|
||||
62
|
||||
63
|
||||
64
|
||||
65
|
||||
66
|
||||
67
|
||||
68
|
||||
69
|
||||
70
|
||||
71
|
||||
72
|
||||
73
|
||||
74
|
||||
75
|
||||
76
|
||||
77
|
||||
78
|
||||
79
|
||||
80
|
||||
81
|
||||
82
|
||||
83
|
||||
84
|
||||
85
|
||||
86
|
||||
87
|
||||
88
|
||||
89
|
||||
90
|
||||
91
|
||||
92
|
||||
93
|
||||
94
|
||||
95
|
||||
96
|
||||
97
|
||||
98
|
||||
99
|
||||
100
|
||||
-1
@@ -1 +0,0 @@
|
||||
VERSION_ID=10
|
||||
-99
@@ -1,99 +0,0 @@
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48
|
||||
49
|
||||
50 52
|
||||
53
|
||||
54
|
||||
55
|
||||
56
|
||||
57
|
||||
58
|
||||
59
|
||||
60
|
||||
61
|
||||
62
|
||||
63
|
||||
64
|
||||
65
|
||||
66
|
||||
67
|
||||
68
|
||||
69
|
||||
70
|
||||
71
|
||||
72
|
||||
73
|
||||
74
|
||||
75
|
||||
76
|
||||
77
|
||||
78
|
||||
79
|
||||
80
|
||||
81
|
||||
82
|
||||
83
|
||||
84
|
||||
85
|
||||
86
|
||||
87
|
||||
88
|
||||
89
|
||||
90
|
||||
91
|
||||
92
|
||||
93
|
||||
94
|
||||
95
|
||||
96
|
||||
97
|
||||
98
|
||||
99
|
||||
100
|
||||
101 10
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 20
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1505693993
|
||||
contentsize: 602
|
||||
|
||||
M... 5686c249b2a962e3edbaa7d7dea879059f55c6501239dbb402ae15882b5ba379 20 os-core
|
||||
@@ -1,19 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 20
|
||||
previous: 10
|
||||
filecount: 11
|
||||
timestamp: 1505693993
|
||||
contentsize: 602
|
||||
status: ACTIVE
|
||||
|
||||
D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr
|
||||
D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/lib
|
||||
D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/share
|
||||
D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/share/clear
|
||||
D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 10 /usr/share/clear/bundles
|
||||
F... 28cb7c6cad23920f344157f48ae353caca34e9a2f5cff934a4fdaaf7509f2062 10 /usr/share/clear/bundles/os-core
|
||||
F... 0c00735e7bf78ac9063de74a9c6712052cdebd05ae5d4a4b76a22c8395d6aa50 20 /bar
|
||||
F... c21cc55db744a24867470b7343bdc6bde1c19e4b5a782fd82c84a86b55de6d54 20 /bat
|
||||
.d.. 0000000000000000000000000000000000000000000000000000000000000000 20 /baz
|
||||
.d.. 0000000000000000000000000000000000000000000000000000000000000000 20 /foo
|
||||
F... 43fff5857537e90559eebe9acce089110b12e62f52b057d57ccdd310f612779a 20 /usr/lib/os-release
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
-1
@@ -1 +0,0 @@
|
||||
VERSION_ID=20
|
||||
@@ -1 +0,0 @@
|
||||
20
|
||||
@@ -1,12 +0,0 @@
|
||||
Update started.
|
||||
Preparing to update from 10 to 100
|
||||
Extracting os-core pack for version 100
|
||||
Statistics for going from version 10 to version 100:
|
||||
changed bundles : 1
|
||||
new bundles : 0
|
||||
deleted bundles : 0
|
||||
changed files : 1
|
||||
new files : 0
|
||||
deleted files : 0
|
||||
Starting download of remaining update content. This may take a while...
|
||||
Finishing download of update content...
|
||||
@@ -1,9 +0,0 @@
|
||||
NAME="Clear Linux Software for Intel Architecture"
|
||||
VERSION=1
|
||||
ID=clear-linux-os
|
||||
VERSION_ID=10
|
||||
PRETTY_NAME="Clear Linux Software for Intel Architecture"
|
||||
ANSI_COLOR="1;35"
|
||||
HOME_URL="https://clearlinux.org"
|
||||
SUPPORT_URL="https://clearlinux.org"
|
||||
BUG_REPORT_URL="https://bugs.clearlinux.org/jira"
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load "../../swupdlib"
|
||||
|
||||
targetfile=6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e
|
||||
|
||||
setup() {
|
||||
clean_test_dir
|
||||
create_manifest_tar 10 MoM
|
||||
sign_manifest_mom 10
|
||||
create_manifest_tar 10 os-core
|
||||
create_manifest_tar 100 MoM
|
||||
sign_manifest_mom 100
|
||||
create_manifest_tar 100 os-core
|
||||
# create_pack_tar 10 100 os-core $targetfile
|
||||
chown_root "$DIR/web-dir/100/staged/$targetfile"
|
||||
tar -C "$DIR/web-dir/100" -cf "$DIR/web-dir/100/pack-os-core-from-10.tar" --exclude=staged/$targetfile/* staged/$targetfile
|
||||
}
|
||||
|
||||
teardown() {
|
||||
clean_tars 10
|
||||
clean_tars 100
|
||||
revert_chown_root "$DIR/web-dir/100/staged/$targetfile"
|
||||
}
|
||||
|
||||
@test "update only download packs" {
|
||||
run sudo sh -c "$SWUPD update $SWUPD_OPTS --download"
|
||||
|
||||
[ "$status" -eq 0 ]
|
||||
check_lines "$output"
|
||||
[ ! -d "$DIR/target-dir/usr/bin" ]
|
||||
}
|
||||
|
||||
# vi: ft=sh ts=8 sw=2 sts=2 et tw=80
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... 441ca59081cdea809fcbf0880253342a9c0f6ae907df808d2ab41ce0cbec07ca 10 os-core
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
|
||||
D... a4d8955d9952c3fcb2241b0f8d225205a5861cec9757b3a075d34810da9b08af 10 /usr/bin
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 100
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... 26e45e3e60cf47097f2ff2f5b41ba9512bc3793b5351a60a9fe49ea80fd4b5fe 100 os-core
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 100
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
|
||||
D... 6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e 100 /usr/bin
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
||||
@@ -1 +0,0 @@
|
||||
100
|
||||
@@ -1,16 +0,0 @@
|
||||
Update started.
|
||||
Preparing to update from 20 to 30
|
||||
Statistics for going from version 20 to version 30:
|
||||
changed bundles : 3
|
||||
new bundles : 0
|
||||
deleted bundles : 0
|
||||
changed files : 1
|
||||
new files : 1
|
||||
deleted files : 0
|
||||
Starting download of remaining update content. This may take a while...
|
||||
Finishing download of update content...
|
||||
Staging file content
|
||||
Applying update
|
||||
Update was applied.
|
||||
2 files were not in a pack
|
||||
Update successful. System updated from version 20 to version 30
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
NAME="Clear Linux Software for Intel Architecture"
|
||||
VERSION=1
|
||||
ID=clear-linux-os
|
||||
VERSION_ID=20
|
||||
PRETTY_NAME="Clear Linux Software for Intel Architecture"
|
||||
ANSI_COLOR="1;35"
|
||||
HOME_URL="https://clearlinux.org"
|
||||
SUPPORT_URL="https://clearlinux.org"
|
||||
BUG_REPORT_URL="https://bugs.clearlinux.org/jira"
|
||||
@@ -1,60 +0,0 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load "../../swupdlib"
|
||||
|
||||
f1=e324302d81e79a935137bd4ed6ab6c6792aa6d4356c9c227342eaa0db015c152
|
||||
f2=826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550
|
||||
|
||||
setup() {
|
||||
clean_test_dir
|
||||
|
||||
create_manifest_tar 10 MoM
|
||||
sign_manifest_mom 10
|
||||
create_manifest_tar 10 os-core
|
||||
create_manifest_tar 10 test-bundle1
|
||||
create_manifest_tar 10 test-bundle2
|
||||
create_manifest_tar 10 test-bundle3
|
||||
|
||||
create_fullfile_tar 10 $f1
|
||||
|
||||
create_manifest_tar 20 MoM
|
||||
sign_manifest_mom 20
|
||||
create_manifest_tar 20 os-core
|
||||
|
||||
create_manifest_tar 30 MoM
|
||||
sign_manifest_mom 30
|
||||
create_manifest_tar 30 os-core
|
||||
create_manifest_tar 30 test-bundle2
|
||||
create_manifest_tar 30 test-bundle3
|
||||
|
||||
create_fullfile_tar 30 $f1
|
||||
create_fullfile_tar 30 $f2
|
||||
}
|
||||
|
||||
teardown() {
|
||||
clean_tars 10
|
||||
clean_tars 20
|
||||
clean_tars 30
|
||||
clean_tars 10 files
|
||||
clean_tars 30 files
|
||||
revert_chown_root "$DIR/web-dir/10/files/$f1"
|
||||
revert_chown_root "$DIR/web-dir/30/files/$f1"
|
||||
revert_chown_root "$DIR/web-dir/30/files/$f2"
|
||||
sudo rm "$DIR/target-dir/os-core"
|
||||
sudo rm "$DIR/target-dir/tracked-file"
|
||||
}
|
||||
|
||||
@test "update include a bundle from an older release" {
|
||||
run sudo sh -c "$SWUPD update $SWUPD_OPTS"
|
||||
|
||||
[ "$status" -eq 0 ]
|
||||
check_lines "$output"
|
||||
|
||||
# changed file
|
||||
[ -f "$DIR/target-dir/os-core" ]
|
||||
|
||||
# new file
|
||||
[ -f "$DIR/target-dir/tracked-file" ]
|
||||
}
|
||||
|
||||
# vi: ft=sh ts=8 sw=2 sts=2 et tw=80
|
||||
@@ -1,11 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... 580f053aa17496cf73a8d579efd4f9fe3af5648b955c2543ec29b88ea467b8ef 10 os-core
|
||||
M... 3a93b49b962874fc6c667f1844aef3fb5508fde5df3bdf71fef71de21acc1d37 10 test-bundle1
|
||||
M... 9a3001655397ab5a5cd40debb72f2c36f1aea02c50aa4429a9efbeee8ac2f359 10 test-bundle2
|
||||
M... fd2b1650fd767509cbe3d8ac6019e96b3c85cb836fba29befe0f9243cb683ac3 10 test-bundle3
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
|
||||
F... dead4952523cf67d92b9f4f03057ca1bf6e1ff018104f7f7ad27d5d4fb38b9ad 10 /os-core
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
includes: os-core
|
||||
|
||||
F... e324302d81e79a935137bd4ed6ab6c6792aa6d4356c9c227342eaa0db015c152 10 /tracked-file
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
includes: os-core
|
||||
|
||||
F... dead85caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 10 /test-bundle2
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
includes: os-core
|
||||
|
||||
F... dead0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 10 /test-bundle3
|
||||
-1
@@ -1 +0,0 @@
|
||||
tracked-file
|
||||
@@ -1,11 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 20
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... 6b7c14932616dc7ab12bcc08458b6881c2f462b6724dbab5864415933d92d762 20 os-core
|
||||
M... 3a93b49b962874fc6c667f1844aef3fb5508fde5df3bdf71fef71de21acc1d37 10 test-bundle1
|
||||
M... 9a3001655397ab5a5cd40debb72f2c36f1aea02c50aa4429a9efbeee8ac2f359 10 test-bundle2
|
||||
M... fd2b1650fd767509cbe3d8ac6019e96b3c85cb836fba29befe0f9243cb683ac3 10 test-bundle3
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 20
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
|
||||
F... dead0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 20 /os-core
|
||||
@@ -1,11 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 30
|
||||
previous: 20
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... 3a93b49b962874fc6c667f1844aef3fb5508fde5df3bdf71fef71de21acc1d37 10 test-bundle1
|
||||
M... 692b27fa22c01d0d513020a7b2e381e9bf8f8fabaf29bf6dd0023fe178c9ee11 30 test-bundle2
|
||||
M... 0f66afd9535a1ac74f35b080cbecd5836528b26024d2d73c18bb3b27a42206dd 30 test-bundle3
|
||||
M... 426e8b2ed2054421880ca41c5ac05aaf29337a1a42eea93ba11cd09b621f3e66 30 os-core
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 30
|
||||
previous: 20
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
|
||||
F... 826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 30 /os-core
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 30
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
includes: os-core
|
||||
includes: test-bundle1
|
||||
|
||||
F... dead85caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 10 /test-bundle2
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 30
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
includes: os-core
|
||||
|
||||
F... dead0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 10 /test-bundle3
|
||||
F... e324302d81e79a935137bd4ed6ab6c6792aa6d4356c9c227342eaa0db015c152 30 /tracked-file
|
||||
-1
@@ -1 +0,0 @@
|
||||
os-core
|
||||
-1
@@ -1 +0,0 @@
|
||||
tracked-file
|
||||
-1
@@ -1 +0,0 @@
|
||||
30
|
||||
@@ -1,16 +0,0 @@
|
||||
Update started.
|
||||
Preparing to update from 10 to 100
|
||||
Statistics for going from version 10 to version 100:
|
||||
changed bundles : 2
|
||||
new bundles : 0
|
||||
deleted bundles : 0
|
||||
changed files : 2
|
||||
new files : 1
|
||||
deleted files : 0
|
||||
Starting download of remaining update content. This may take a while...
|
||||
Finishing download of update content...
|
||||
Staging file content
|
||||
Applying update
|
||||
Update was applied.
|
||||
3 files were not in a pack
|
||||
Update successful. System updated from version 10 to version 100
|
||||
@@ -1,9 +0,0 @@
|
||||
NAME="Clear Linux Software for Intel Architecture"
|
||||
VERSION=1
|
||||
ID=clear-linux-os
|
||||
VERSION_ID=10
|
||||
PRETTY_NAME="Clear Linux Software for Intel Architecture"
|
||||
ANSI_COLOR="1;35"
|
||||
HOME_URL="https://clearlinux.org"
|
||||
SUPPORT_URL="https://clearlinux.org"
|
||||
BUG_REPORT_URL="https://bugs.clearlinux.org/jira"
|
||||
@@ -1,56 +0,0 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load "../../swupdlib"
|
||||
|
||||
f1=491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7
|
||||
f2=a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50
|
||||
f3=826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550
|
||||
|
||||
setup() {
|
||||
clean_test_dir
|
||||
|
||||
create_manifest_tar 10 MoM
|
||||
sign_manifest_mom 10
|
||||
create_manifest_tar 10 os-core
|
||||
create_manifest_tar 10 test-bundle1
|
||||
create_manifest_tar 10 test-bundle2
|
||||
|
||||
create_fullfile_tar 10 $f1
|
||||
|
||||
create_manifest_tar 100 MoM
|
||||
sign_manifest_mom 100
|
||||
create_manifest_tar 100 os-core
|
||||
create_manifest_tar 100 test-bundle1
|
||||
|
||||
create_fullfile_tar 100 $f2
|
||||
create_fullfile_tar 100 $f3
|
||||
}
|
||||
|
||||
teardown() {
|
||||
clean_tars 10
|
||||
clean_tars 100
|
||||
clean_tars 10 files
|
||||
clean_tars 100 files
|
||||
revert_chown_root "$DIR/web-dir/10/files/$f1"
|
||||
revert_chown_root "$DIR/web-dir/100/files/$f2"
|
||||
revert_chown_root "$DIR/web-dir/100/files/$f3"
|
||||
sudo rm "$DIR/target-dir/os-core"
|
||||
sudo rm "$DIR/target-dir/test-bundle1"
|
||||
sudo rm "$DIR/target-dir/test-bundle2"
|
||||
}
|
||||
|
||||
@test "update include a bundle from an older release" {
|
||||
run sudo sh -c "$SWUPD update $SWUPD_OPTS"
|
||||
|
||||
[ "$status" -eq 0 ]
|
||||
check_lines "$output"
|
||||
|
||||
# changed files
|
||||
[ -f "$DIR/target-dir/os-core" ]
|
||||
[ -f "$DIR/target-dir/test-bundle1" ]
|
||||
|
||||
# new file
|
||||
[ -f "$DIR/target-dir/test-bundle2" ]
|
||||
}
|
||||
|
||||
# vi: ft=sh ts=8 sw=2 sts=2 et tw=80
|
||||
@@ -1,10 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... 580f053aa17496cf73a8d579efd4f9fe3af5648b955c2543ec29b88ea467b8ef 10 os-core
|
||||
M... 98280dd551d2240379a523538b7eb774c72e9685085f77f2ed51b1d966ef172c 10 test-bundle1
|
||||
M... 7850d639166a2a7e166b1150448b80f39296c811c9a899e2823433e094322deb 10 test-bundle2
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
|
||||
F... dead4952523cf67d92b9f4f03057ca1bf6e1ff018104f7f7ad27d5d4fb38b9ad 10 /os-core
|
||||
@@ -1,9 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
includes: os-core
|
||||
|
||||
F... dead955d9952c3fcb2241b0f8d225205a5861cec9757b3a075d34810da9b08af 10 /test-bundle1
|
||||
@@ -1,9 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
includes: os-core
|
||||
|
||||
F... 491685caf9cf95df0f721254748df4717b4159513a3e0170ff5fa404dccc32e7 10 /test-bundle2
|
||||
-1
@@ -1 +0,0 @@
|
||||
test-bundle2
|
||||
@@ -1,10 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 100
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... 88d187e20077ac674ee02a0f2bdc5da780ee2eceb23a341ddeb50e35f9d423f6 100 os-core
|
||||
M... fd21b17f85529035177e0b97bb97b0466cf3f9f741459ecd46249ad4f2f0dc12 100 test-bundle1
|
||||
M... 7850d639166a2a7e166b1150448b80f39296c811c9a899e2823433e094322deb 10 test-bundle2
|
||||
@@ -1,8 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 100
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
|
||||
F... 826e0a73bdb6ca4863842b07ead83a55b478a950fefd2b1832b30046ce1c1550 100 /os-core
|
||||
@@ -1,10 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 100
|
||||
previous: 10
|
||||
filecount: 1
|
||||
timestamp: 1451936779
|
||||
contentsize: 17929151
|
||||
includes: os-core
|
||||
includes: test-bundle2
|
||||
|
||||
F... a96e0b959874854750e8e08372e62c4d1821c5e0106694365396d02c363ada50 100 /test-bundle1
|
||||
-1
@@ -1 +0,0 @@
|
||||
os-core
|
||||
-1
@@ -1 +0,0 @@
|
||||
test-bundle1
|
||||
@@ -1 +0,0 @@
|
||||
100
|
||||
@@ -1,16 +0,0 @@
|
||||
Update started.
|
||||
Preparing to update from 10 to 100
|
||||
Statistics for going from version 10 to version 100:
|
||||
changed bundles : 2
|
||||
new bundles : 6
|
||||
deleted bundles : 0
|
||||
changed files : 2
|
||||
new files : 6
|
||||
deleted files : 0
|
||||
Starting download of remaining update content. This may take a while...
|
||||
Finishing download of update content...
|
||||
Staging file content
|
||||
Applying update
|
||||
Update was applied.
|
||||
8 files were not in a pack
|
||||
Update successful. System updated from version 10 to version 100
|
||||
@@ -1,9 +0,0 @@
|
||||
NAME="Clear Linux Software for Intel Architecture"
|
||||
VERSION=1
|
||||
ID=clear-linux-os
|
||||
VERSION_ID=10
|
||||
PRETTY_NAME="Clear Linux Software for Intel Architecture"
|
||||
ANSI_COLOR="1;35"
|
||||
HOME_URL="https://clearlinux.org"
|
||||
SUPPORT_URL="https://clearlinux.org"
|
||||
BUG_REPORT_URL="https://bugs.clearlinux.org/jira"
|
||||
@@ -1,82 +0,0 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load "../../swupdlib"
|
||||
|
||||
f1=6c27df6efcd6fc401ff1bc67c970b83eef115f6473db4fb9d57e5de317eba96e
|
||||
f2=5f79d142c1859a3d82e9391a9a23a5f697e9346714412b67c78729c5a7b6ae1f
|
||||
f3=a325dc221e0e03802b5a81abdf7318074230ca1f980985032048b5b6ce193850
|
||||
f4=d1f70150c56e960ca18bd636131fae747487ac93836429ada2a46f85b88af28f
|
||||
f5=4185aaf172a7f8b0cffb79fa379dc2227edb7097f24a61f7ce5b3881e38a66a2
|
||||
f6=e2c7d7bb180e8b44ce0fb4e58f3b2f3852d7fbbb0fafbe04e41159d006501a88
|
||||
f7=01fe90f246616cc07c216fa4fc1444881a5f2804650989996a44d223e0bfb105
|
||||
f8=9a94d945b3841b70df7117fd02cffa36e4f1e5b430703b8fd26c086bf1059e72
|
||||
|
||||
setup() {
|
||||
clean_test_dir
|
||||
create_manifest_tar 10 MoM
|
||||
sign_manifest_mom 10
|
||||
create_manifest_tar 10 os-core
|
||||
create_manifest_tar 10 test-bundle1
|
||||
create_manifest_tar 10 test-bundle2
|
||||
create_manifest_tar 100 MoM
|
||||
sign_manifest_mom 100
|
||||
create_manifest_tar 100 os-core
|
||||
create_manifest_tar 100 test-bundle1
|
||||
create_manifest_tar 100 test-bundle2
|
||||
create_manifest_tar 100 test-bundle3
|
||||
create_manifest_tar 100 test-bundle4
|
||||
create_manifest_tar 100 test-bundle5
|
||||
create_manifest_tar 100 test-bundle6
|
||||
create_manifest_tar 100 test-bundle7
|
||||
create_fullfile_tar 100 $f1
|
||||
create_fullfile_tar 100 $f2
|
||||
create_fullfile_tar 100 $f3
|
||||
create_fullfile_tar 100 $f4
|
||||
create_fullfile_tar 100 $f5
|
||||
create_fullfile_tar 100 $f6
|
||||
create_fullfile_tar 100 $f7
|
||||
create_fullfile_tar 100 $f8
|
||||
}
|
||||
|
||||
teardown() {
|
||||
clean_tars 10
|
||||
clean_tars 100
|
||||
clean_tars 100 files
|
||||
revert_chown_root "$DIR/web-dir/100/files/$f1"
|
||||
revert_chown_root "$DIR/web-dir/100/files/$f2"
|
||||
revert_chown_root "$DIR/web-dir/100/files/$f3"
|
||||
revert_chown_root "$DIR/web-dir/100/files/$f4"
|
||||
revert_chown_root "$DIR/web-dir/100/files/$f5"
|
||||
revert_chown_root "$DIR/web-dir/100/files/$f6"
|
||||
revert_chown_root "$DIR/web-dir/100/files/$f7"
|
||||
revert_chown_root "$DIR/web-dir/100/files/$f8"
|
||||
sudo rmdir "$DIR/target-dir/usr/bin"
|
||||
sudo rm "$DIR/target-dir/usr/core"
|
||||
sudo rm "$DIR/target-dir/usr/foo2"
|
||||
sudo rm "$DIR/target-dir/usr/foo3"
|
||||
sudo rm "$DIR/target-dir/usr/foo4"
|
||||
sudo rm "$DIR/target-dir/usr/foo5"
|
||||
sudo rm "$DIR/target-dir/usr/foo6"
|
||||
sudo rm "$DIR/target-dir/usr/foo7"
|
||||
}
|
||||
|
||||
@test "update with includes" {
|
||||
run sudo sh -c "$SWUPD update $SWUPD_OPTS"
|
||||
|
||||
[ "$status" -eq 0 ]
|
||||
check_lines "$output"
|
||||
|
||||
# changed files
|
||||
[ -d "$DIR/target-dir/usr/bin" ]
|
||||
[ -f "$DIR/target-dir/usr/core" ]
|
||||
|
||||
# new files
|
||||
[ -f "$DIR/target-dir/usr/foo2" ]
|
||||
[ -f "$DIR/target-dir/usr/foo3" ]
|
||||
[ -f "$DIR/target-dir/usr/foo4" ]
|
||||
[ -f "$DIR/target-dir/usr/foo5" ]
|
||||
[ -f "$DIR/target-dir/usr/foo6" ]
|
||||
[ -f "$DIR/target-dir/usr/foo7" ]
|
||||
}
|
||||
|
||||
# vi: ft=sh ts=8 sw=2 sts=2 et tw=80
|
||||
@@ -1,10 +0,0 @@
|
||||
MANIFEST 3
|
||||
version: 10
|
||||
previous: 0
|
||||
filecount: 1
|
||||
timestamp: 1451940175
|
||||
contentsize: 0
|
||||
|
||||
M... 607b36d693fe9d3366ae2c994402387f1bb75ce287565d4534fa288a40bc6872 10 os-core
|
||||
M... 80c89d8fca3bb6ac550a51c9ef660f51877912098bb4dbe2da35de76dbbbd8fe 10 test-bundle1
|
||||
M... 7a7ee4ee962e8246287f65073cdc3273661d13e455d1138ce78410f204c2e091 10 test-bundle2
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user