Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72bccfac authored by Jack He's avatar Jack He
Browse files

[GD Cert] Support Python 3.9

* AOSP upgraded to Python 3.9 recently
* Use Python 3.9 as default test runner
* Modify logging lines in setup.py

Bug: 178410571
Tag: #gd-refactor
Test: gd/cert/run
Change-Id: I65cb619d747102d8f145511feb20a40d8bf38790
parent 52c299b2
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -54,8 +54,14 @@ function check_environment {
      echo
      exit 1
    fi
    if ! [ -x "$(command -v python3.8)" ] ; then
      echo -e "${RED}You must have python 3.8 installed${NOCOLOR}"
    if ! [ -x "$(command -v python3.9)" ] ; then
      echo -e "${RED}You must have python 3.9 installed${NOCOLOR}"
      exit 1
    fi
    python3.9 -m virtualenv --version
    if [[ $? -ne 0 ]] ; then
        echo "${RED}virtualenv not installed for python3.9${NOCOLOR}"
        echo "${RED}Please run 'python3.9 -m pip install virtualenv' to install it${NOCOLOR}"
        exit 1
    fi
}
@@ -265,7 +271,7 @@ function setup_venv {
            echo -e "${NOCOLOR}"
        fi
    fi
    python3.8 -m virtualenv --python `which python3.8` "${CERT_TEST_VENV}"
    python3.9 -m virtualenv --python `which python3.9` "${CERT_TEST_VENV}"
    if [[ $? -ne 0 ]] ; then
        echo "Error setting up virtualenv"
        exit 1
+2 −2
Original line number Diff line number Diff line
@@ -74,9 +74,9 @@ class InstallLocalPackagesForInstallation(install):
        if self.reuse_acts and is_acts_importable():
            self.announce('Reusing existing ACTS installation', log.WARN)
        else:
            self.announce('Installing ACTS for installation', log.WARN)
            self.announce('Installing ACTS library', log.WARN)
            setup_acts_for_cmd_or_die("install")
            self.announce('ACTS installed for installation.', log.WARN)
            self.announce('ACTS installed.', log.WARN)
        if not is_acts_importable():
            raise DistutilsModuleError("Cannot import acts after installation")
        install.run(self)