Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hash_backup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Blomdell
hash_backup
Commits
b506ddef
Commit
b506ddef
authored
4 years ago
by
Anders Blomdell
Browse files
Options
Downloads
Patches
Plain Diff
Change test to check that all needed parts are included by apa
parent
45fc6f10
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
test/test_sha512backup.sh
+26
-10
26 additions, 10 deletions
test/test_sha512backup.sh
with
27 additions
and
11 deletions
Makefile
+
1
−
1
View file @
b506ddef
SOURCE_hashbackup
=
command.py config.py loghandler.py hashtoc.py
\
SOURCE_hashbackup
=
command.py config.py loghandler.py hashtoc.py
\
primary.py secondary.py
primary.py secondary.py
tar_stream.py
all
:
md5backup sha512backup
all
:
md5backup sha512backup
...
...
This diff is collapsed.
Click to expand it.
test/test_sha512backup.sh
+
26
−
10
View file @
b506ddef
...
@@ -47,27 +47,43 @@ config > "${TESTDIR}/2/TOTALBACKUP.config"
...
@@ -47,27 +47,43 @@ config > "${TESTDIR}/2/TOTALBACKUP.config"
#config
#config
#../config.py <(config)
#../config.py <(config)
../sha512backup
--xattr
--primary
<
(
config
)
2> /dev/null
cp
../sha512backup
"
${
TESTDIR
}
/"
${
TESTDIR
}
/sha512backup
--xattr
--primary
<
(
config
)
2> /dev/null
# Check that source and dest are equal
# Check that source and dest are equal
diff
-u
<
(
cd
../test
;
find |
sort
)
<
(
cd
${
TESTDIR
}
/1/test
;
find |
sort
)
diff
-u
\
diff
-u
<
(
cd
../.git/refs
;
find |
sort
)
<
(
cd
${
TESTDIR
}
/2/.git/refs
;
find |
sort
)
<
(
cd
../test
;
find |
sort
)
\
<
(
cd
${
TESTDIR
}
/1/test
;
find |
sort
)
diff
-u
\
<
(
cd
../.git/refs
;
find |
sort
)
\
<
(
cd
${
TESTDIR
}
/2/.git/refs
;
find |
sort
)
# Delete temporary file
# Delete temporary file
rm
${
TESTFILE
}
rm
${
TESTFILE
}
# Make sure source and dest differs
# Make sure source and dest differs
!
diff
-u
<
(
cd
../test
;
find |
sort
)
<
(
cd
${
TESTDIR
}
/1/test
;
find |
sort
)
!
\
diff
-u
<
(
cd
../.git/refs
;
find |
sort
)
<
(
cd
${
TESTDIR
}
/2/.git/refs
;
find |
sort
)
diff
-u
\
<
(
cd
../test
;
find |
sort
)
\
<
(
cd
${
TESTDIR
}
/1/test
;
find |
sort
)
diff
-u
\
<
(
cd
../test
;
find |
sort
)
\
<
(
cd
${
TESTDIR
}
/1/test
;
find |
grep
-v
"
${
TESTFILE
}
"
|
sort
)
diff
-u
\
<
(
cd
../.git/refs
;
find |
sort
)
\
<
(
cd
${
TESTDIR
}
/2/.git/refs
;
find |
sort
)
# Bring dest to sync
# Bring dest to sync
..
/sha512backup
--xattr
--primary
<
(
config
)
2> /dev/null
${
TESTDIR
}
/sha512backup
--xattr
--primary
<
(
config
)
2> /dev/null
# Check that source and dest are equal
# Check that source and dest are equal
diff
-u
<
(
cd
../test
;
find |
sort
)
<
(
cd
${
TESTDIR
}
/1/test
;
find |
sort
)
diff
-u
\
diff
-u
<
(
cd
../.git/refs
;
find |
sort
)
<
(
cd
${
TESTDIR
}
/2/.git/refs
;
find |
sort
)
<
(
cd
../test
;
find |
sort
)
\
<
(
cd
${
TESTDIR
}
/1/test
;
find |
sort
)
diff
-u
\
<
(
cd
../.git/refs
;
find |
sort
)
\
<
(
cd
${
TESTDIR
}
/2/.git/refs
;
find |
sort
)
# Check that deleted file exists in TRASH
# Check that deleted file exists in TRASH
[
-f
${
TESTDIR
}
/1/TRASH/
*
/
${
TESTFILE
}
]
[
-f
${
TESTDIR
}
/1/TRASH/
*
/
${
TESTFILE
}
]
# ../md5backup --xattr --primary <(config)
# find ${TESTDIR}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment