runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ubuntu-18.04, ubuntu-20.04] # 18.04.3 release has 5.0.0 kernel
+ os: [ubuntu-20.04]
env:
- TYPE: Debug
PYTHON_TEST_LOGFILE: critical.log
-FROM ubuntu:18.04
+ARG UBUNTU_VERSION="18.04"
+FROM ubuntu:${UBUNTU_VERSION}
ARG LLVM_VERSION="8"
ENV LLVM_VERSION=$LLVM_VERSION
+ARG UBUNTU_SHORTNAME="bionic"
+
RUN apt-get update && apt-get install -y curl gnupg &&\
llvmRepository="\n\
-deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main\n\
-deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic main\n\
-deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${LLVM_VERSION} main\n\
-deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${LLVM_VERSION} main\n" &&\
+deb http://apt.llvm.org/${UBUNTU_SHORTNAME}/ llvm-toolchain-${UBUNTU_SHORTNAME} main\n\
+deb-src http://apt.llvm.org/${UBUNTU_SHORTNAME}/ llvm-toolchain-${UBUNTU_SHORTNAME} main\n\
+deb http://apt.llvm.org/${UBUNTU_SHORTNAME}/ llvm-toolchain-${UBUNTU_SHORTNAME}-${LLVM_VERSION} main\n\
+deb-src http://apt.llvm.org/${UBUNTU_SHORTNAME}/ llvm-toolchain-${UBUNTU_SHORTNAME}-${LLVM_VERSION} main\n" &&\
echo $llvmRepository >> /etc/apt/sources.list && \
curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
+ARG DEBIAN_FRONTEND="noninteractive"
+ENV TZ="Etc/UTC"
+
RUN apt-get update && apt-get install -y \
util-linux \
bison \
iproute2 \
python3 \
python3-pip \
- python-pip \
ethtool \
arping \
netperf \
libtinfo5 \
libtinfo-dev
-RUN pip3 install pyroute2 netaddr dnslib cachetools
-RUN pip install pyroute2==0.5.18 netaddr==0.8.0 dnslib==0.9.14 cachetools==3.1.1
+RUN pip3 install pyroute2==0.5.18 netaddr==0.8.0 dnslib==0.9.14 cachetools==3.1.1
# FIXME this is faster than building from source, but it seems there is a bug
# in probing libruby.so rather than ruby binary
# Licensed under the Apache License, Version 2.0 (the "License")
if(NOT PYTHON_CMD)
- set(PYTHON_CMD "python")
+ set(PYTHON_CMD "python3")
endif()
if(EXISTS "/etc/debian_version")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright 2021, Athira Rajeev, IBM Corp.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) Sasha Goldshtein
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) Clevernet
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# USAGE: test_usdt.py
#
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2018 Clevernet, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2017 Facebook, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# USAGE: test_map_batch_ops.py
#
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# USAGE: test_map_in_map.py
#
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2016 PLUMgrid
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) Suchakra Sharma <suchakrapani.sharma@polymtl.ca>
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# USAGE: test_usdt.py
#
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2016 Facebook, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
from unittest import main, skipUnless, TestCase
from utils import kernel_version_ge
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) Sasha Goldshtein, 2017
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) Sasha Goldshtein
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# USAGE: test_uprobe2.py
#
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# USAGE: test_usdt.py
#
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# USAGE: test_usdt2.py
#
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# USAGE: test_usdt3.py
#
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) Catalysts GmbH
# Licensed under the Apache License, Version 2.0 (the "License")
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
kind=$1; shift
cmd=$1; shift
-PYTHONPATH=@CMAKE_BINARY_DIR@/src/python/bcc-python
+PYTHONPATH=@CMAKE_BINARY_DIR@/src/python/bcc-python3
LD_LIBRARY_PATH=@CMAKE_BINARY_DIR@:@CMAKE_BINARY_DIR@/src/cc
ns=$name