blob: d96c67a09fd9ea35af0863a8cdb0dbc54ef405b3 [file] [log] [blame]
Jamie Gennis92791472012-03-05 17:33:58 -08001#!/usr/bin/env python
2
Zhen Wang46b43bf2015-08-28 09:54:29 -07003# Copyright (c) 2015 The Chromium Authors. All rights reserved.
Jamie Gennis4b56a2b2012-04-28 01:06:56 -07004# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
Jamie Gennis92791472012-03-05 17:33:58 -08006
Zhen Wang46b43bf2015-08-28 09:54:29 -07007import os
Brent Austinc0555cc2015-05-14 14:05:59 -07008import sys
Jamie Gennis92791472012-03-05 17:33:58 -08009
Zhen Wang46b43bf2015-08-28 09:54:29 -070010version = sys.version_info[:2]
11if version != (2, 7):
12 sys.stderr.write('Systrace does not support Python %d.%d. '
13 'Please use Python 2.7.\n' % version)
Brent Austinc0555cc2015-05-14 14:05:59 -070014 sys.exit(1)
15
Zhen Wang46b43bf2015-08-28 09:54:29 -070016systrace_dir = os.path.abspath(
Chris Craikbe1f9092016-03-28 13:54:49 -070017 os.path.join(os.path.dirname(__file__), 'catapult', 'systrace'))
Zhen Wang46b43bf2015-08-28 09:54:29 -070018sys.path.insert(0, systrace_dir)
Chris Craikbe1f9092016-03-28 13:54:49 -070019
Chris Craika23c9e92016-08-19 14:42:29 -070020from systrace import run_systrace
Brent Austin6975e312015-05-14 13:27:45 -070021
Jamie Gennis92791472012-03-05 17:33:58 -080022if __name__ == '__main__':
Chris Craika23c9e92016-08-19 14:42:29 -070023 sys.exit(run_systrace.main())