Skip to content

Commit

Permalink
Use pyproject.toml in example
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <[email protected]>
  • Loading branch information
LecrisUT committed May 28, 2024
1 parent cb3ded9 commit 4f15d6d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
16 changes: 16 additions & 0 deletions examples/plugins/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[project]
name = "demo-plugins"
version = "0.0.1"
dependencies = [
"tmt",
]

[tool.setuptools]
py-modules = [
"discover",
"provision",
]

[project.entry-points."tmt.plugin"]
ProvisionExample = "provision:ProvisionExample"
DiscoverExample = "discover:DiscoverExample"
13 changes: 0 additions & 13 deletions examples/plugins/setup.py

This file was deleted.

6 changes: 0 additions & 6 deletions tests/plugins/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ rlJournalStart
rlPhaseEnd

rlPhaseStartTest "Using TMT_PLUGINS"
# setup.py is not a plugin and cannot be loaded
rlRun "mv ./plugins/setup.py ./plugins/setup.XXX"

# Plugins are not available before
rlRun -s "$tmt run discover -h example --help" "2"
rlAssertGrep "Unsupported discover method" "$rlRun_LOG"
Expand All @@ -53,9 +50,6 @@ rlJournalStart
rlRun "export TMT_PLUGINS=./plugins"
rlRun "$tmt run discover -h example --help"
rlRun "$tmt run provision -h example --help"

rlRun "unset TMT_PLUGINS"
rlRun "mv ./plugins/setup.XXX ./plugins/setup.py"
rlPhaseEnd

rlPhaseStartCleanup
Expand Down

0 comments on commit 4f15d6d

Please sign in to comment.