Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
Martijn Braam
factorytest
Commits
8d0c14e6
Verified
Commit
8d0c14e6
authored
Jul 21, 2020
by
Martijn Braam
Browse files
Automatic tests now successfully flash the anx7688 usb firmware, disabled the USB button for now.
parent
ccaa9210
Changes
5
Hide whitespace changes
Inline
Side-by-side
README.rst
View file @
8d0c14e6
...
...
@@ -19,5 +19,6 @@ Current tests
* RGB notification led test
* Vibration motor test
* Flashlight and torch test
* ANX7688, flash firmware and verify it loads with a cable plugged in
After the tests are successfull a bundled OS image can be flashed, it supports compressed images and bmap files.
\ No newline at end of file
factorytest/__main__.py
View file @
8d0c14e6
...
...
@@ -103,7 +103,6 @@ class AutoTests(threading.Thread):
result
=
anx
.
test_anx
()
GLib
.
idle_add
(
self
.
callback
,
[
'Testing OV5640'
,
6
,
(
'anx'
,
result
)])
# Rear camera
result
=
camera
.
check_ov5640
()
GLib
.
idle_add
(
self
.
callback
,
[
'Testing GC2145'
,
7
,
(
'rearcam'
,
result
)])
...
...
@@ -532,6 +531,10 @@ class Handler:
self
.
run_yesno
(
'torch'
,
'Does the flashlight light up?'
)
led
.
test_torch
()
def
on_test_anx_clicked
(
self
,
*
args
):
self
.
run_yesno
(
'torch'
,
'No test?'
)
led
.
test_torch
()
def
on_flasher_button_clicked
(
self
,
button
):
button
.
set_sensitive
(
False
)
thread
=
Flasher
(
self
.
on_flasher_update
)
...
...
factorytest/anx.py
View file @
8d0c14e6
import
os
import
subprocess
import
time
# Fresh phone:
...
...
@@ -23,4 +24,5 @@ def test_anx():
def
run_firmware_update
():
subprocess
.
run
([
'sudo'
,
'sh -c "echo 1 > /sys/class/typec/port0/device/flash_eeprom"'
])
subprocess
.
run
([
'sudo'
,
'sh'
,
'-c'
,
'echo 1 > /sys/class/typec/port0/device/flash_eeprom'
])
time
.
sleep
(
2
)
factorytest/factorytest.glade
View file @
8d0c14e6
...
...
@@ -194,6 +194,7 @@
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"sensitive"
>
False
</property>
<signal
name=
"clicked"
handler=
"on_test_anx_clicked"
swapped=
"no"
/>
</object>
<packing>
...
...
setup.py
View file @
8d0c14e6
...
...
@@ -2,7 +2,7 @@ from setuptools import setup
setup
(
name
=
'factorytest_pinephone'
,
version
=
'0.4
8
.0'
,
version
=
'0.4
9
.0'
,
packages
=
[
'factorytest'
,
'factorytest.ioctl'
,
'factorytest.bmap'
],
url
=
'https://gitlab.com/MartijnBraam/factorytest'
,
license
=
'MIT'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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