2015-02-06 03:36:16 +01:00
|
|
|
#!/usr/bin/env python
|
2015-02-24 00:23:34 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
# Copyright (C) 2015 Philipp Rosenkranz <philipp.rosenkranz@fu-berlin.de>
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with this library; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
# 02110-1301 USA
|
2015-02-06 03:36:16 +01:00
|
|
|
|
|
|
|
import os
|
|
|
|
|
2015-12-07 10:28:34 +01:00
|
|
|
arm_mcu_groups = ["arm7", "cortex_m0_2", "cortex_m0_1", "cortex_m3_1",
|
2016-03-08 20:37:25 +01:00
|
|
|
"cortex_m3_2", "cortex_m4_1", "cortex_m4_2", "cortex_m4_3"]
|
2015-02-06 03:36:16 +01:00
|
|
|
msp_mcu_groups = ["msp430"]
|
|
|
|
x86_mcu_groups = ["x86"]
|
|
|
|
avr8_mcu_groups = ["avr8"]
|
2015-02-24 00:17:28 +01:00
|
|
|
static_tests_groups = ["static-tests"]
|
2015-02-24 00:27:58 +01:00
|
|
|
known_mcu_groups = arm_mcu_groups + msp_mcu_groups + x86_mcu_groups + \
|
|
|
|
avr8_mcu_groups + static_tests_groups
|
2015-02-06 03:36:16 +01:00
|
|
|
|
2016-03-05 16:09:07 +01:00
|
|
|
common_pkgs = ["pcregrep", "libpcre3", "python3", "python3-pexpect"]
|
2014-12-16 17:36:38 +01:00
|
|
|
|
|
|
|
# testing the relic pkg and its RIOT specific unit test requires cmake
|
|
|
|
common_pkgs = common_pkgs + ["cmake"]
|
|
|
|
|
2015-02-24 00:27:58 +01:00
|
|
|
arm_pkgs = ["gcc-arm-none-eabi"]
|
|
|
|
msp_pkgs = ["gcc-msp430"]
|
|
|
|
x86_pkgs = ["qemu-system-x86", "g++-multilib", "gcc-multilib",
|
2016-01-23 16:17:23 +01:00
|
|
|
"build-essential","python-pip"]
|
2015-02-24 00:27:58 +01:00
|
|
|
avr8_pkgs = ["gcc-avr", "binutils-avr", "avr-libc"]
|
2015-02-24 00:17:28 +01:00
|
|
|
static_tests_pkgs = ["doxygen", "cppcheck"]
|
2015-02-24 00:27:58 +01:00
|
|
|
all_mcu_pkgs = arm_pkgs + msp_pkgs + \
|
|
|
|
x86_pkgs + avr8_pkgs + static_tests_pkgs
|
2015-02-06 03:36:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
pkgs_to_install = common_pkgs
|
|
|
|
if "BUILDTEST_MCU_GROUP" in os.environ:
|
2015-02-24 00:27:58 +01:00
|
|
|
mcu_group = os.environ["BUILDTEST_MCU_GROUP"]
|
|
|
|
if mcu_group not in known_mcu_groups:
|
|
|
|
pkgs_to_install += all_mcu_pkgs
|
|
|
|
elif mcu_group in arm_mcu_groups:
|
|
|
|
pkgs_to_install += arm_pkgs
|
|
|
|
elif mcu_group in msp_mcu_groups:
|
|
|
|
pkgs_to_install += msp_pkgs
|
|
|
|
elif mcu_group in x86_mcu_groups:
|
|
|
|
pkgs_to_install += x86_pkgs
|
|
|
|
elif mcu_group in avr8_mcu_groups:
|
|
|
|
pkgs_to_install += avr8_pkgs
|
|
|
|
elif mcu_group in static_tests_groups:
|
|
|
|
pkgs_to_install += static_tests_pkgs
|
2015-02-06 03:36:16 +01:00
|
|
|
else:
|
2015-02-24 00:27:58 +01:00
|
|
|
pkgs_to_install += all_mcu_pkgs
|
2015-02-06 03:36:16 +01:00
|
|
|
|
|
|
|
print " ".join(pkgs_to_install)
|