2016-09-26 19:56:43 +02:00
|
|
|
#!/usr/bin/python
|
2016-09-23 04:22:07 +02:00
|
|
|
#
|
2019-12-10 04:32:03 +01:00
|
|
|
# Copyright (C) 2019 The Android Open Source Project
|
2016-09-23 04:22:07 +02:00
|
|
|
#
|
2019-12-10 04:32:03 +01:00
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
2016-09-23 04:22:07 +02:00
|
|
|
#
|
2019-12-10 04:32:03 +01:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2016-09-23 04:22:07 +02:00
|
|
|
#
|
2019-12-10 04:32:03 +01:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
2016-05-10 08:19:42 +02:00
|
|
|
|
2019-12-10 04:32:03 +01:00
|
|
|
"""Call -m warn.warn to process warning messages.
|
2016-05-10 08:19:42 +02:00
|
|
|
|
2019-12-10 04:32:03 +01:00
|
|
|
This script is used by Android continuous build bots for all branches.
|
|
|
|
Old frozen branches will continue to use the old warn.py, and active
|
|
|
|
branches will use this new version to call -m warn.warn.
|
2016-09-23 04:22:07 +02:00
|
|
|
"""
|
2016-09-26 19:56:43 +02:00
|
|
|
|
2019-12-10 04:32:03 +01:00
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
import sys
|
2016-09-26 19:56:43 +02:00
|
|
|
|
|
|
|
|
2016-09-28 19:48:06 +02:00
|
|
|
def main():
|
2019-12-10 04:32:03 +01:00
|
|
|
os.environ['PYTHONPATH'] = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
subprocess.check_call(['/usr/bin/python', '-m', 'warn.warn'] + sys.argv[1:])
|
2016-09-28 19:48:06 +02:00
|
|
|
|
2016-09-23 04:22:07 +02:00
|
|
|
|
2016-09-28 19:48:06 +02:00
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|