Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools_dso
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
setuptools_dso
Commits
7f41a51e
Commit
7f41a51e
authored
Jan 05, 2022
by
Michael Davidsaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unittests for ProbeToolchain
parent
c778f1c3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
4 deletions
+33
-4
.github/workflows/build.yml
.github/workflows/build.yml
+13
-3
setup.py
setup.py
+1
-1
src/setuptools_dso/test/__init__.py
src/setuptools_dso/test/__init__.py
+0
-0
src/setuptools_dso/test/test_probe.py
src/setuptools_dso/test/test_probe.py
+19
-0
No files found.
.github/workflows/build.yml
View file @
7f41a51e
...
@@ -25,23 +25,33 @@ jobs:
...
@@ -25,23 +25,33 @@ jobs:
uses
:
actions/setup-python@v2
uses
:
actions/setup-python@v2
with
:
with
:
python-version
:
${{ matrix.python-version }}
python-version
:
${{ matrix.python-version }}
-
name
:
Builder Info
-
name
:
Prepare
run
:
|
run
:
|
set -x
set -x
which python
which python
python --version
python --version
python -m pip install -U pip
python -m pip --version
python -m pip --version
-
name
:
Test
-
name
:
Deps
shell
:
bash
shell
:
bash
run
:
|
run
:
|
set -x
set -x
# capture other deps
pip download -d dist setuptools wheel nose2
pip download -d dist setuptools wheel nose2
python -m pip install -v --no-index -f dist setuptools wheel nose2
python -m pip install -v --no-index -f dist setuptools wheel nose2
python -m nose2 -h
-
name
:
Build/Install
shell
:
bash
run
:
|
set -x
python setup.py sdist --formats=gztar
python setup.py sdist --formats=gztar
ls dist
ls dist
# build from source tar to ensure completeness
# build from source tar to ensure completeness
python -m pip install -v --no-index -f dist setuptools_dso
python -m pip install -v --no-index -f dist setuptools_dso
-
name
:
Test
shell
:
bash
run
:
|
set -x
python -m nose2 setuptools_dso
-
name
:
Test Example wheel
-
name
:
Test Example wheel
shell
:
bash
shell
:
bash
run
:
|
run
:
|
...
...
setup.py
View file @
7f41a51e
...
@@ -33,6 +33,6 @@ setup(
...
@@ -33,6 +33,6 @@ setup(
python_requires
=
'>=2.7'
,
python_requires
=
'>=2.7'
,
install_requires
=
[
'setuptools'
],
install_requires
=
[
'setuptools'
],
packages
=
[
'setuptools_dso'
],
packages
=
[
'setuptools_dso'
,
'setuptools_dso.test'
],
package_dir
=
{
''
:
'src'
},
package_dir
=
{
''
:
'src'
},
)
)
src/setuptools_dso/test/__init__.py
0 → 100644
View file @
7f41a51e
src/setuptools_dso/test/test_probe.py
0 → 100644
View file @
7f41a51e
import
unittest
from
..
import
probe
class
TryCompile
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
probe
=
probe
.
ProbeToolchain
(
verbose
=
True
)
def
test_try_compile
(
self
):
self
.
assertTrue
(
self
.
probe
.
try_compile
(
'#include <stdlib.h>'
))
self
.
assertFalse
(
self
.
probe
.
try_compile
(
'intentionally invalid syntax'
))
self
.
assertTrue
(
self
.
probe
.
check_include
(
'stdlib.h'
))
self
.
assertFalse
(
self
.
probe
.
check_include
(
'no-such-header.h'
))
self
.
assertEqual
(
self
.
probe
.
sizeof
(
'short'
),
2
)
self
.
assertTrue
(
self
.
probe
.
check_symbol
(
'RAND_MAX'
,
headers
=
[
'stdlib.h'
]))
self
.
assertTrue
(
self
.
probe
.
check_symbol
(
'abort'
,
headers
=
[
'stdlib.h'
]))
self
.
assertFalse
(
self
.
probe
.
check_symbol
(
'intentionally_undeclared_symbol'
,
headers
=
[
'stdlib.h'
]))
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