Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
94982370
Commit
94982370
authored
Nov 03, 2016
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkasm: Add --test parameter to check only specific components
Inspired by a patch from Martin Storsjö <martin@martin.st>.
parent
de6e2ff3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
checkasm.c
tests/checkasm/checkasm.c
+18
-10
No files found.
tests/checkasm/checkasm.c
View file @
94982370
...
...
@@ -180,6 +180,7 @@ static struct {
int
nop_time
;
int
cpu_flag
;
const
char
*
cpu_flag_name
;
const
char
*
test_name
;
}
state
;
/* PRNG state */
...
...
@@ -470,6 +471,8 @@ static void check_cpu_flag(const char *name, int flag)
state
.
cpu_flag_name
=
name
;
for
(
i
=
0
;
tests
[
i
].
func
;
i
++
)
{
if
(
state
.
test_name
&&
strcmp
(
tests
[
i
].
name
,
state
.
test_name
))
continue
;
state
.
current_test_name
=
tests
[
i
].
name
;
tests
[
i
].
func
();
}
...
...
@@ -487,7 +490,7 @@ static void print_cpu_name(void)
int
main
(
int
argc
,
char
*
argv
[])
{
unsigned
int
seed
;
unsigned
int
seed
=
av_get_random_seed
()
;
int
i
,
ret
=
0
;
#if ARCH_ARM && HAVE_ARMV5TE_EXTERNAL
...
...
@@ -500,22 +503,27 @@ int main(int argc, char *argv[])
return
0
;
}
if
(
argc
>
1
&&
!
strncmp
(
argv
[
1
],
"--bench"
,
7
))
{
while
(
argc
>
1
)
{
if
(
!
strncmp
(
argv
[
1
],
"--bench"
,
7
))
{
#ifndef AV_READ_TIME
fprintf
(
stderr
,
"checkasm: --bench is not supported on your system
\n
"
);
return
1
;
fprintf
(
stderr
,
"checkasm: --bench is not supported on your system
\n
"
);
return
1
;
#endif
if
(
argv
[
1
][
7
]
==
'='
)
{
state
.
bench_pattern
=
argv
[
1
]
+
8
;
state
.
bench_pattern_len
=
strlen
(
state
.
bench_pattern
);
}
else
state
.
bench_pattern
=
""
;
if
(
argv
[
1
][
7
]
==
'='
)
{
state
.
bench_pattern
=
argv
[
1
]
+
8
;
state
.
bench_pattern_len
=
strlen
(
state
.
bench_pattern
);
}
else
state
.
bench_pattern
=
""
;
}
else
if
(
!
strncmp
(
argv
[
1
],
"--test="
,
7
))
{
state
.
test_name
=
argv
[
1
]
+
7
;
}
else
{
seed
=
strtoul
(
argv
[
1
],
NULL
,
10
);
}
argc
--
;
argv
++
;
}
seed
=
(
argc
>
1
)
?
strtoul
(
argv
[
1
],
NULL
,
10
)
:
av_get_random_seed
();
fprintf
(
stderr
,
"checkasm: using random seed %u
\n
"
,
seed
);
av_lfg_init
(
&
checkasm_lfg
,
seed
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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