Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fengzch-das
nunchaku
Commits
69eb9e6f
"tools/vscode:/vscode.git/clone" did not exist on "673a54de834f01f9a504aebb707e87b99b461b7f"
Commit
69eb9e6f
authored
Aug 02, 2025
by
Muyang Li
Browse files
chore: better test logs
parent
92d75723
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
.github/workflows/pr-test.yaml
.github/workflows/pr-test.yaml
+2
-2
.github/workflows/run_all_tests.py
.github/workflows/run_all_tests.py
+1
-1
tests/flux/test_flux_examples.py
tests/flux/test_flux_examples.py
+1
-3
No files found.
.github/workflows/pr-test.yaml
View file @
69eb9e6f
...
@@ -108,13 +108,13 @@ jobs:
...
@@ -108,13 +108,13 @@ jobs:
pwd
pwd
cd ../ComfyUI
cd ../ComfyUI
python nunchaku_tests/scripts/nunchaku-flux1-dev.py
python nunchaku_tests/scripts/nunchaku-flux1-dev.py
pytest -s nunchaku_tests/
pytest -s
-x
nunchaku_tests/
-
name
:
Run nunchaku tests
-
name
:
Run nunchaku tests
run
:
|
run
:
|
source $(conda info --base)/etc/profile.d/conda.sh
source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
which python
which python
pytest -s tests/flux/test_flux_examples.py
pytest -s
-x
tests/flux/test_flux_examples.py
python .github/workflows/run_all_tests.py
python .github/workflows/run_all_tests.py
-
name
:
clean up
-
name
:
clean up
if
:
always()
if
:
always()
...
...
.github/workflows/run_all_tests.py
View file @
69eb9e6f
...
@@ -21,7 +21,7 @@ def run_all_tests():
...
@@ -21,7 +21,7 @@ def run_all_tests():
failed_tests
=
[]
failed_tests
=
[]
for
test_file
in
test_files
:
for
test_file
in
test_files
:
print
(
f
"Running
{
test_file
}
..."
)
print
(
f
"Running
{
test_file
}
..."
)
result
=
subprocess
.
run
([
"pytest"
,
"--reruns"
,
"2"
,
"--reruns-delay"
,
"0"
,
"-s"
,
test_file
])
result
=
subprocess
.
run
([
"pytest"
,
"--reruns"
,
"2"
,
"--reruns-delay"
,
"0"
,
"-s"
,
"-x"
,
test_file
])
if
result
.
returncode
!=
0
:
if
result
.
returncode
!=
0
:
print
(
f
"Test failed:
{
test_file
}
"
)
print
(
f
"Test failed:
{
test_file
}
"
)
failed_tests
.
append
(
test_file
)
failed_tests
.
append
(
test_file
)
...
...
tests/flux/test_flux_examples.py
View file @
69eb9e6f
...
@@ -12,9 +12,7 @@ example_scripts = [f for f in os.listdir(EXAMPLES_DIR) if f.endswith(".py") and
...
@@ -12,9 +12,7 @@ example_scripts = [f for f in os.listdir(EXAMPLES_DIR) if f.endswith(".py") and
@
pytest
.
mark
.
parametrize
(
"script_name"
,
example_scripts
)
@
pytest
.
mark
.
parametrize
(
"script_name"
,
example_scripts
)
def
test_example_script_runs
(
script_name
):
def
test_example_script_runs
(
script_name
):
gc
.
collect
()
torch
.
cuda
.
empty_cache
()
script_path
=
os
.
path
.
join
(
EXAMPLES_DIR
,
script_name
)
script_path
=
os
.
path
.
join
(
EXAMPLES_DIR
,
script_name
)
result
=
subprocess
.
run
([
"python"
,
script_path
],
capture_output
=
True
,
text
=
True
)
result
=
subprocess
.
run
([
"python"
,
script_path
],
text
=
True
)
print
(
f
"Running
{
script_path
}
-> Return code:
{
result
.
returncode
}
"
)
print
(
f
"Running
{
script_path
}
-> Return code:
{
result
.
returncode
}
"
)
assert
result
.
returncode
==
0
,
f
"
{
script_path
}
failed with code
{
result
.
returncode
}
"
assert
result
.
returncode
==
0
,
f
"
{
script_path
}
failed with code
{
result
.
returncode
}
"
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