Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
f0fcbbd8
Commit
f0fcbbd8
authored
11 months ago
by
Thibault Martin
Browse files
Options
Downloads
Patches
Plain Diff
[tests] Add a mechanism to run `-p` automatically if needed
parent
a552dbfd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/test.sh
+31
-2
31 additions, 2 deletions
bin/test.sh
with
31 additions
and
2 deletions
bin/test.sh
+
31
−
2
View file @
f0fcbbd8
...
@@ -344,6 +344,35 @@ function GenerateCoverage
...
@@ -344,6 +344,35 @@ function GenerateCoverage
# --- Test Suite Preparation
# --- Test Suite Preparation
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
function
GenerateDuneFiles
{
Head
"Generating dune files..."
Cmd make run-ptests
}
function
CheckDuneFiles
{
DEFAULT_FILE
=
tests/syntax/result/dune
if
[
"
$PREPARE
"
!=
"yes"
]
;
then
if
[
!
-f
"
$DEFAULT_FILE
"
]
;
then
GenerateDuneFiles
else
DATE_TEST_MODIFICATION
=
$(
find
$TESTS
-type
f
\
-not
-path
"*/result*/*"
\
-not
-path
"*/oracle*/*"
\
-exec
stat
--printf
"%Y
\n
"
{}
\+
|
\
sort
-n
-r
|
head
-n
1
)
DATE_TEST_GENERATION
=
$(
stat
$DEFAULT_FILE
--printf
"%Y
\n
"
)
if
[
$DATE_TEST_MODIFICATION
-gt
$DATE_TEST_GENERATION
]
;
then
GenerateDuneFiles
fi
fi
fi
}
function
PrepareTests
function
PrepareTests
{
{
if
[
"
$TESTS
"
=
""
]
;
then
if
[
"
$TESTS
"
=
""
]
;
then
...
@@ -361,8 +390,7 @@ function PrepareTests
...
@@ -361,8 +390,7 @@ function PrepareTests
fi
fi
if
[
"
$PREPARE
"
=
"yes"
]
if
[
"
$PREPARE
"
=
"yes"
]
then
then
Head
"Generating dune files..."
GenerateDuneFiles
Cmd make run-ptests
fi
fi
}
}
...
@@ -530,6 +558,7 @@ SetEnv
...
@@ -530,6 +558,7 @@ SetEnv
PullCache
PullCache
PrepareCoverage
PrepareCoverage
PrepareTests
PrepareTests
CheckDuneFiles
Register
$TESTS
Register
$TESTS
RunAlias
${
DUNE_ALIAS
}
RunAlias
${
DUNE_ALIAS
}
Commits
${
COMMITS
}
Commits
${
COMMITS
}
...
...
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