Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
etf
cmssam
Commits
4b6bae3e
Commit
4b6bae3e
authored
Jul 03, 2020
by
Andrea Sciaba
Browse files
In basic test, skip age check if date cannot be parsed
parent
b128a1f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
SiteTests/testjob/tests/CE-cms-basic
View file @
4b6bae3e
...
...
@@ -232,9 +232,16 @@ if [ $rc == 0 ] ; then
CommitInfoUrl
=
"https://gitlab.cern.ch/api/v4/projects/siteconf%2F
${
SiteName
}
/repository/commits/
${
last_commit
}
"
./fetch-from-web-gitlab
\"
$CommitInfoUrl
\"
$FileInfoTmp
FileDate
=
$(
grep
-Po
'"authored_date":.*?[^\\]",'
${
FileInfoTmp
}
| perl
-pe
's/"authored_date"://; s/^"//; s/",$//'
)
let
seconds
=
`
date
+%s
`
-
`
date
+%s
-d
"
$FileDate
"
`
let
cvsFileAgeInHours
=
$seconds
/3600
echo
"GITTFCAge:
${
cvsFileAgeInHours
}
hours"
echo
"Commit date:
$FileDate
"
FileEpoch
=
`
date
+%s
-d
"
$FileDate
"
`
if
[
X
$FileEpoch
==
X
]
;
then
echo
"Error in parsing commit date. Skipping the age check"
cvsFileAgeInHours
=
0
else
let
seconds
=
`
date
+%s
`
-
`
date
+%s
-d
"
$FileDate
"
`
let
cvsFileAgeInHours
=
$seconds
/3600
echo
"GITTFCAge:
${
cvsFileAgeInHours
}
hours"
fi
if
[
$localTFCfileAgeInHours
-gt
120
]
&&
[
$cvsFileAgeInHours
-gt
120
]
;
then
error
=
1
echo
"ERROR: local Trivial Catalog File file differ from GIT"
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment