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
6e5e6942
Commit
6e5e6942
authored
3 years ago
by
Andre Maroneze
Browse files
Options
Downloads
Patches
Plain Diff
[Ptests] ignore hidden files when given a directory
parent
aae2e1f7
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
ptests/ptests.ml
+14
-10
14 additions, 10 deletions
ptests/ptests.ml
with
14 additions
and
10 deletions
ptests/ptests.ml
+
14
−
10
View file @
6e5e6942
...
...
@@ -2031,18 +2031,22 @@ let () =
else
begin
if
not
(
List
.
mem
suite
exclude_suite
)
then
begin
let
dirname
=
SubDir
.
get
directory
in
let
dir_files
=
Sys
.
readdir
dirname
in
let
dir_files
=
Array
.
to_list
(
Sys
.
readdir
dirname
)
in
(* ignore hidden files (starting with '.' *)
let
dir_files
=
List
.
filter
(
fun
n
->
String
.
get
n
0
<>
'.'
)
dir_files
in
if
!
verbosity
>=
2
then
lock_printf
"%% - Look at %d entries of the directory %S ...@."
(
Array
.
length
dir_files
)
dirname
;
for
i
=
0
to
pred
(
Array
.
length
dir_files
)
do
let
file
=
dir_files
.
(
i
)
in
assert
(
Filename
.
is_relative
file
);
if
test_pattern
dir_config
file
&&
(
not
(
List
.
mem
(
SubDir
.
make_file
directory
file
)
exclude_file
))
then
Queue
.
push
(
file
,
directory
,
dir_config
)
files
;
done
(
List
.
length
dir_files
)
dirname
;
List
.
iter
(
fun
file
->
assert
(
Filename
.
is_relative
file
);
if
test_pattern
dir_config
file
&&
(
not
(
List
.
mem
(
SubDir
.
make_file
directory
file
)
exclude_file
))
then
Queue
.
push
(
file
,
directory
,
dir_config
)
files
;
)
dir_files
end
end
)
suites
...
...
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