Verified Commit 8d0c14e6 authored by Martijn Braam's avatar Martijn Braam
Browse files

Automatic tests now successfully flash the anx7688 usb firmware, disabled the USB button for now.

parent ccaa9210
......@@ -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
......@@ -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)
......
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)
......@@ -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>
......
......@@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='factorytest_pinephone',
version='0.48.0',
version='0.49.0',
packages=['factorytest', 'factorytest.ioctl', 'factorytest.bmap'],
url='https://gitlab.com/MartijnBraam/factorytest',
license='MIT',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment