def __find_aapt(): """ Find aapt tool under $ANDRODI_HOME/build-tools :return: Path to appt. """ aapt_executable = 'aapt' if CURRENT_OS is OSType.WINDOWS: aapt_executable += '.exe' base_path = os.path.join(ANDROID_HOME, 'build-tools') return File.find(base_path=base_path, file_name=aapt_executable, exact_match=True)
def install(): package = File.find(base_path=SUT_FOLDER, file_name="nativescript") output = Npm.install(package=package, folder=TEST_RUN_HOME) message = "NativeScript CLI installation failed - \"{e}\" found in output." assert "dev-post-install" not in output, message.format( e="dev-post-install") cli_path = os.path.join(TEST_RUN_HOME, "node_modules", ".bin", "tns") assert File.exists( cli_path ), "NativeScript CLI installation failed - tns does not exist."