Skip to content

Commit b20c27d

Browse files
authored
Merge pull request #195 from getappmap/scripts-main_20221120
fix: allow scripts to be run with -m
2 parents 52aa28e + dc75658 commit b20c27d

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

appmap/command/appmap_agent_init.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ def _run():
2626

2727
def run():
2828
sys.exit(_run())
29+
30+
31+
if __name__ == "__main__":
32+
run()

appmap/command/appmap_agent_status.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,7 @@ def run():
136136
)
137137
args = parser.parse_args()
138138
sys.exit(_run(discover_tests=args.discover_tests))
139+
140+
141+
if __name__ == "__main__":
142+
run()

appmap/command/appmap_agent_validate.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,7 @@ def _run():
8080

8181
def run():
8282
sys.exit(_run())
83+
84+
85+
if __name__ == "__main__":
86+
run()

ci/smoketest.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ pip install /dist/appmap-*-py3-none-any.whl
66

77
cp -R /appmap/test/data/unittest/simple ./.
88

9-
appmap-agent-init |\
9+
python -m appmap.command.appmap_agent_init |\
1010
python -c 'import json,sys; print(json.load(sys.stdin)["configuration"]["contents"])' > /tmp/appmap.yml
1111
cat /tmp/appmap.yml
1212

13-
appmap-agent-validate
13+
python -m appmap.command.appmap_agent_validate
1414

1515
APPMAP=true pytest -v -k test_hello_world
1616

0 commit comments

Comments
 (0)