Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
monolith
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
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
POTTIER Francois
monolith
Commits
7e925ccc
Commit
7e925ccc
authored
1 month ago
by
POTTIER Francois
Browse files
Options
Downloads
Patches
Plain Diff
Refactoring: move to call to [Arg.parse] into [main].
parent
abede482
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
src/Engine.ml
+7
-10
7 additions, 10 deletions
src/Engine.ml
with
7 additions
and
10 deletions
src/Engine.ml
+
7
−
10
View file @
7e925ccc
...
@@ -1506,21 +1506,18 @@ let run_random ?timeout prologue fuel : int =
...
@@ -1506,21 +1506,18 @@ let run_random ?timeout prologue fuel : int =
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
(*
Find the name of our input file on the command line
. *)
(*
[main ?prologue fuel] parses the command line and starts testing
. *)
let
source
:
string
option
=
let
main
?
prologue
:
(
prologue
=
ignore
)
fuel
=
(* Parse the command line. *)
let
usage
=
sprintf
"Usage: %s <input file>"
Sys
.
argv
.
(
0
)
in
let
usage
=
sprintf
"Usage: %s <input file>"
Sys
.
argv
.
(
0
)
in
let
source
=
ref
None
in
let
source
=
ref
None
in
Arg
.
parse
[]
(
fun
s
->
source
:=
Some
s
)
usage
;
Arg
.
parse
[]
(
fun
s
->
source
:=
Some
s
)
usage
;
!
source
(* -------------------------------------------------------------------------- *)
(* Reading input data from the source file whose name was given on the command
line, perform a number of test runs. *)
let
main
?
prologue
:
(
prologue
=
ignore
)
fuel
=
(* If a source file name was provided on the command line, enter AFL mode;
match
source
with
otherwise, enter random testing mode. *)
match
!
source
with
|
Some
source
->
|
Some
source
->
run_afl
source
prologue
fuel
run_afl
source
prologue
fuel
|
None
->
|
None
->
...
...
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