1#!/usr/bin/env python3 2# -*- coding: utf-8 -*- 3# Copyright 2020 The Chromium OS Authors. All rights reserved. 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7"""Generate a virtual cmd script for pass level bisection. 8 9This is a required argument for pass level bisecting. For unit test, we use 10this script to verify if cmd_script.sh is generated correctly. 11""" 12 13from __future__ import print_function 14 15import os 16import sys 17 18 19def Main(): 20 if not os.path.exists('./is_setup'): 21 return 1 22 file_name = 'cmd_script.sh' 23 with open(file_name, 'w', encoding='utf-8') as f: 24 f.write('Generated by generate_cmd.py') 25 return 0 26 27 28if __name__ == '__main__': 29 retval = Main() 30 sys.exit(retval) 31