Skip to content

Commit 9eb5325

Browse files
committed
[testapp] Rename setup_test_app.py to setup.py
Because reducing filename to `setup.py` will make our cli arguments shorter and source code cleaner
1 parent 8c9236e commit 9eb5325

File tree

6 files changed

+10
-11
lines changed

6 files changed

+10
-11
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ rebuild_updated_recipes: virtualenv
3838
testapps/python2/%: virtualenv
3939
$(eval $@_APP_ARCH := $(shell basename $*))
4040
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \
41-
python setup_test_app.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
41+
python setup.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
4242
--requirements sdl2,pyjnius,kivy,python2,openssl,requests,sqlite3,setuptools \
4343
--arch=$($@_APP_ARCH)
4444

4545
testapps/python3/%: virtualenv
4646
$(eval $@_APP_ARCH := $(shell basename $*))
4747
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \
48-
python setup_test_app.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
48+
python setup.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
4949
--requirements sdl2,pyjnius,kivy,python3,openssl,requests,sqlite3,setuptools,numpy \
5050
--arch=$($@_APP_ARCH)
5151

ci/rebuild_updated_recipes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def build(target_python, requirements):
5555
"""
5656
if not requirements:
5757
return
58-
testapp = 'setup_test_app.py'
5958
android_sdk_home = os.environ['ANDROID_SDK_HOME']
6059
android_ndk_home = os.environ['ANDROID_NDK_HOME']
6160
requirements.add(target_python.name)
@@ -64,7 +63,7 @@ def build(target_python, requirements):
6463
with current_directory('testapps/on_device_unit_tests/'):
6564
# iterates to stream the output
6665
for line in sh.python(
67-
testapp, 'apk', '--sdk-dir', android_sdk_home,
66+
'setup.py', 'apk', '--sdk-dir', android_sdk_home,
6867
'--ndk-dir', android_ndk_home, '--requirements',
6968
requirements, _err_to_out=True, _iter=True):
7069
print(line)

doc/source/testing_pull_requests.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Installing python-for-android using the github's branch of the pull request
172172

173173
.. code-block:: bash
174174

175-
python3 setup_test_app.py apk \
175+
python3 setup.py apk \
176176
--ndk-dir=/media/DEVEL/Android/android-ndk-r20 \
177177
--sdk-dir=/media/DEVEL/Android/android-sdk-linux \
178178
--android-api=27 \
@@ -183,7 +183,7 @@ Installing python-for-android using the github's branch of the pull request
183183
Things that you should know:
184184

185185
- In the example above, we override some variables that are set in
186-
`setup_test_app.py`, you could also override them by editing this file
186+
`setup.py`, you could also override them by editing this file
187187
- be sure to at least edit the following arguments when running the above
188188
command, since the default set in there it's unlikely that match your
189189
installation:

testapps/on_device_unit_tests/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ It currently supports three app `modes`:
1515
The main tests are for the recipes built in the apk. Each module (or
1616
other tool) is at least imported and subject to some basic check.
1717

18-
This test app can be build via `setup_test_app.py` or via buildozer. In both
18+
This test app can be build via `setup.py` or via buildozer. In both
1919
cases it will build a basic kivy app with a set of tests defined via the
2020
`requirements` keyword (specified at build time).
2121

@@ -26,7 +26,7 @@ permissions in your device to use such app).
2626
Building the app with python-for-android
2727
========================================
2828

29-
You can use the provided file `setup_test_app.py`. Check our `Makefile
29+
You can use the provided file `setup.py`. Check our `Makefile
3030
<https://github.com/kivy/python-for-android/blob/develop/Makefile>`__ to guess
3131
how to build the test app, or also you can look at `testing pull requests documentation
3232
<https://github.com/kivy/python-for-android/blob/develop/doc/source/testing_pull_requests.rst>`__,

testapps/on_device_unit_tests/test_app/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
- A unittest app (webview bootstrap)
1515
- A non-gui unittests app
1616
17-
If you install/build this app via the `setup_test_app.py` file, a file named
17+
If you install/build this app via the `setup.py` file, a file named
1818
`app_requirements.txt` will be generated which will contain the requirements
19-
that we passed to the `setup_test_app.py` via arguments, which will determine
19+
that we passed to the `setup.py` via arguments, which will determine
2020
the unittests that this app will run.
2121
2222
.. note:: This app is made to be working on desktop and on an android device.
@@ -27,7 +27,7 @@
2727
these on desktop just by editing the file `app_requirements.txt`,
2828
which should be located at the same location than this file. This
2929
`app_requirements.txt` file, it's autogenerated when the
30-
`setup_test_app.py` is ran, so in certain circumstances, you may need
30+
`setup.py` is ran, so in certain circumstances, you may need
3131
to create it. Also be aware that each `python-for-android` recipe
3232
that you want to test should be in a new line, taking into account the
3333
case of the recipe.

0 commit comments

Comments
 (0)