Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lwc
/
compare
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
39cdf84b
authored
5 years ago
by
Enrico Pozzobon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small changes made on tester pc
parent
c87607fe
master
…
128B
f7_masked
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
13 deletions
+58
-13
compile_all.py
+2
-0
index.html
+24
-7
process_zip.sh
+1
-1
test-dude.py
+30
-4
test_common.py
+1
-1
No files found.
compile_all.py
View file @
39cdf84b
...
@@ -139,6 +139,8 @@ def main(argv):
...
@@ -139,6 +139,8 @@ def main(argv):
for
variant
in
os
.
listdir
(
variants_dir
):
for
variant
in
os
.
listdir
(
variants_dir
):
implementations_dir
=
os
.
path
.
join
(
implementations_dir
=
os
.
path
.
join
(
variants_dir
,
variant
)
variants_dir
,
variant
)
if
not
os
.
path
.
isdir
(
implementations_dir
):
continue
for
implementation
in
os
.
listdir
(
implementations_dir
):
for
implementation
in
os
.
listdir
(
implementations_dir
):
implementation_dir
=
os
.
path
.
join
(
implementation_dir
=
os
.
path
.
join
(
implementations_dir
,
implementation
)
implementations_dir
,
implementation
)
...
...
This diff is collapsed.
Click to expand it.
index.html
View file @
39cdf84b
...
@@ -142,7 +142,8 @@ function onStatusGet(status) {
...
@@ -142,7 +142,8 @@ function onStatusGet(status) {
// Find out correct placement in table
// Find out correct placement in table
let
ids
=
Object
.
keys
(
schedule
);
let
ids
=
Object
.
keys
(
schedule
);
ids
.
sort
();
ids
.
sort
(
i
=>
i
|
0
);
const
idx
=
ids
.
indexOf
(
s
.
id
);
const
idx
=
ids
.
indexOf
(
s
.
id
);
if
(
idx
==
-
1
)
{
if
(
idx
==
-
1
)
{
throw
new
Error
(
s
.
id
+
" NOT FOUND"
);
throw
new
Error
(
s
.
id
+
" NOT FOUND"
);
...
@@ -172,11 +173,11 @@ function onStatusGet(status) {
...
@@ -172,11 +173,11 @@ function onStatusGet(status) {
}
}
const
row
=
schedule
[
s
.
id
].
row
;
const
row
=
schedule
[
s
.
id
].
row
;
row
.
cells
[
1
].
innerText
=
s
.
added
.
substr
(
0
,
16
)
updateInnerText
(
row
.
cells
[
1
],
s
.
added
.
substr
(
0
,
16
)
+
'\n'
+
s
.
added
.
substr
(
17
);
+
'\n'
+
s
.
added
.
substr
(
17
)
)
;
row
.
cells
[
2
].
innerText
=
s
.
path
;
updateInnerText
(
row
.
cells
[
2
],
s
.
path
)
;
row
.
cells
[
3
].
innerText
=
s
.
template
;
updateInnerText
(
row
.
cells
[
3
],
s
.
template
)
;
row
.
cells
[
4
].
innerText
=
s
.
state
;
updateInnerText
(
row
.
cells
[
4
],
s
.
state
)
;
if
(
s
.
state
==
'FAILED'
)
{
if
(
s
.
state
==
'FAILED'
)
{
row
.
style
.
backgroundColor
=
'#fcc'
;
row
.
style
.
backgroundColor
=
'#fcc'
;
}
else
if
(
s
.
state
==
'SUCCESSFUL'
)
{
}
else
if
(
s
.
state
==
'SUCCESSFUL'
)
{
...
@@ -191,6 +192,13 @@ function onStatusGet(status) {
...
@@ -191,6 +192,13 @@ function onStatusGet(status) {
}
}
function
updateInnerText
(
element
,
text
)
{
if
(
element
.
innerText
!==
text
)
{
element
.
innerText
=
text
;
}
}
function
showJobMenu
(
event
,
jobId
)
{
function
showJobMenu
(
event
,
jobId
)
{
closeJobMenu
();
closeJobMenu
();
...
@@ -204,7 +212,7 @@ function showJobMenu(event, jobId) {
...
@@ -204,7 +212,7 @@ function showJobMenu(event, jobId) {
const
button
=
document
.
createElement
(
'a'
);
const
button
=
document
.
createElement
(
'a'
);
button
.
innerHTML
=
label
;
button
.
innerHTML
=
label
;
button
.
onclick
=
(
e
)
=>
{
closeJobMenu
();
onClick
(
e
);};
button
.
onclick
=
(
e
)
=>
{
closeJobMenu
();
onClick
(
e
);};
button
.
href
=
'
#
'
;
button
.
href
=
'
javascript:;
'
;
button
.
className
=
'menuEntry'
;
button
.
className
=
'menuEntry'
;
return
button
;
return
button
;
}
}
...
@@ -269,6 +277,15 @@ function restartJob(jobId) {
...
@@ -269,6 +277,15 @@ function restartJob(jobId) {
}
}
function
deleteJob
(
jobId
)
{
if
(
confirm
(
"Confirm deleting job "
+
jobId
+
"?"
))
{
const
xhttp
=
new
XMLHttpRequest
();
xhttp
.
open
(
"GET"
,
"/delete_test/"
+
jobId
,
true
);
xhttp
.
send
();
}
}
function
cancelJob
(
jobId
)
{
function
cancelJob
(
jobId
)
{
const
xhttp
=
new
XMLHttpRequest
();
const
xhttp
=
new
XMLHttpRequest
();
xhttp
.
open
(
"GET"
,
"/cancel_test/"
+
jobId
,
true
);
xhttp
.
open
(
"GET"
,
"/cancel_test/"
+
jobId
,
true
);
...
...
This diff is collapsed.
Click to expand it.
process_zip.sh
View file @
39cdf84b
...
@@ -94,7 +94,7 @@ function run() {
...
@@ -94,7 +94,7 @@ function run() {
done
done
#
rm -rf "$TMPDIR"
rm
-rf
"
$TMPDIR
"
}
}
if
[[
$1
==
"run"
]]
;
then
if
[[
$1
==
"run"
]]
;
then
...
...
This diff is collapsed.
Click to expand it.
test-dude.py
View file @
39cdf84b
...
@@ -56,6 +56,13 @@ class ScheduledTest:
...
@@ -56,6 +56,13 @@ class ScheduledTest:
res
[
k
]
=
getattr
(
self
,
k
)
res
[
k
]
=
getattr
(
self
,
k
)
return
res
return
res
def
from_dict
(
dict
):
a
=
ScheduledTest
()
for
k
in
ScheduledTest
.
__slots__
:
if
k
not
in
ScheduledTest
.
_unserialized_slots
:
setattr
(
a
,
k
,
dict
[
k
])
return
a
class
Runner
(
threading
.
Thread
):
class
Runner
(
threading
.
Thread
):
_next_id
=
1
_next_id
=
1
...
@@ -136,12 +143,13 @@ class Runner(threading.Thread):
...
@@ -136,12 +143,13 @@ class Runner(threading.Thread):
except
subprocess
.
TimeoutExpired
:
except
subprocess
.
TimeoutExpired
:
pass
pass
if
self
.
process
.
returncode
==
0
:
returncode
=
self
.
process
.
returncode
self
.
job
.
state
=
'SUCCESSFUL'
else
:
self
.
job
.
state
=
'FAILED'
self
.
process
=
None
self
.
process
=
None
if
returncode
!=
0
:
raise
Exception
(
"Test has failed with return code"
,
returncode
)
pack_results
(
pack_results
(
self
.
job
,
self
.
job
,
self
.
platform
)
self
.
platform
)
...
@@ -156,7 +164,9 @@ class Runner(threading.Thread):
...
@@ -156,7 +164,9 @@ class Runner(threading.Thread):
try
:
try
:
self
.
do_job
()
self
.
do_job
()
self
.
job
.
state
=
'SUCCESSFUL'
except
Exception
as
ex
:
except
Exception
as
ex
:
self
.
job
.
state
=
'FAILED'
print
(
ex
)
print
(
ex
)
print
(
"Job
%
s has finished"
%
self
.
job
.
id
)
print
(
"Job
%
s has finished"
%
self
.
job
.
id
)
...
@@ -173,6 +183,21 @@ class Status(Resource):
...
@@ -173,6 +183,21 @@ class Status(Resource):
})
})
class
DeleteJob
(
Resource
):
def
get
(
self
,
job_id
):
job
=
[
job
for
job
in
schedule
if
job
.
id
==
job_id
]
job
=
job
[
0
]
if
len
(
job
)
>
0
else
None
if
job
is
None
:
return
'Job not found'
,
404
with
job
.
lock
:
if
job
.
state
!=
'RUNNING'
:
schedule
.
remove
(
job
)
return
jsonify
({
'success'
:
True
})
else
:
return
'Job is already running'
,
400
class
RestartJob
(
Resource
):
class
RestartJob
(
Resource
):
def
get
(
self
,
job_id
):
def
get
(
self
,
job_id
):
job
=
[
job
for
job
in
schedule
if
job
.
id
==
job_id
]
job
=
[
job
for
job
in
schedule
if
job
.
id
==
job_id
]
...
@@ -211,6 +236,7 @@ class ScheduleJob(Resource):
...
@@ -211,6 +236,7 @@ class ScheduleJob(Resource):
api
.
add_resource
(
Status
,
'/status'
)
api
.
add_resource
(
Status
,
'/status'
)
api
.
add_resource
(
ScheduleJob
,
'/schedule_test'
)
api
.
add_resource
(
ScheduleJob
,
'/schedule_test'
)
api
.
add_resource
(
RestartJob
,
'/restart_test/<string:job_id>'
)
api
.
add_resource
(
RestartJob
,
'/restart_test/<string:job_id>'
)
api
.
add_resource
(
DeleteJob
,
'/delete_test/<string:job_id>'
)
@app.route
(
'/'
)
@app.route
(
'/'
)
...
...
This diff is collapsed.
Click to expand it.
test_common.py
View file @
39cdf84b
...
@@ -652,4 +652,4 @@ def run_nist_lws_aead_test(dut, vectors_file, build_dir,
...
@@ -652,4 +652,4 @@ def run_nist_lws_aead_test(dut, vectors_file, build_dir,
with
open
(
path
,
'wt'
)
as
f
:
with
open
(
path
,
'wt'
)
as
f
:
print
(
"TIME,VALUE"
,
file
=
f
)
print
(
"TIME,VALUE"
,
file
=
f
)
for
t
,
v
in
logic_trace
:
for
t
,
v
in
logic_trace
:
print
(
"
%
f,0x
%
x"
%
(
t
,
v
),
file
=
f
)
print
(
"
%
.10
f,0x
%
x"
%
(
t
,
v
),
file
=
f
)
This diff is collapsed.
Click to expand it.
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