babeltrace: check header include guards in lint job master
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 24 May 2024 16:14:39 +0000 (12:14 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 24 May 2024 16:15:56 +0000 (12:15 -0400)
Change-Id: Ia39a497ca392abf10dd390c7f43a4c7dd4ed2e30
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
13 files changed:
automation/ansible/group_vars/node_armhf.yml [deleted file]
automation/ansible/group_vars/node_wandboard.yml [new file with mode: 0644]
automation/ansible/hosts
automation/ansible/hosts.yml
automation/ansible/roles/common/tasks/setup-Windows.yml
automation/ansible/roles/requirements.yml
jobs/babeltrace.yaml
jobs/binutils-gdb.yaml
scripts/babeltrace/build.sh
scripts/babeltrace/lint.sh
scripts/binutils-gdb/build.sh
scripts/liburcu/build.sh
scripts/lttng-tools/build.sh

diff --git a/automation/ansible/group_vars/node_armhf.yml b/automation/ansible/group_vars/node_armhf.yml
deleted file mode 100644 (file)
index 27c2931..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
----
-# The SATA controllers on the boards that are running the armhf
-# nodes are somewhat flaky, and the root filesystem often ends
-# up readonly due to errors. When the FS goes read-only, jobs
-# will fail so the easiest action is to have the node reboot.
-common_node_rootfs_readonly_reboot: true
diff --git a/automation/ansible/group_vars/node_wandboard.yml b/automation/ansible/group_vars/node_wandboard.yml
new file mode 100644 (file)
index 0000000..27c2931
--- /dev/null
@@ -0,0 +1,6 @@
+---
+# The SATA controllers on the boards that are running the armhf
+# nodes are somewhat flaky, and the root filesystem often ends
+# up readonly due to errors. When the FS goes read-only, jobs
+# will fail so the easiest action is to have the node reboot.
+common_node_rootfs_readonly_reboot: true
index 793f4a45720c981267ec9852bc73c1714d2dd0d9..5e5b771bfb2317df5bb3f4da083318ff7dc6efe6 100644 (file)
@@ -33,6 +33,9 @@ ci-host-win11-arm64-01.internal.efficios.com
 [infra_lava]
 lava-master-03.internal.efficios.com
 
+[node_wandboard]
+ci-node-deb12-armhf-[01:08]
+
 [node_armhf]
 ci-node-deb12-armhf-01
 ci-node-deb12-armhf-02
index 33b9062a953359ddfb31cf39a18d48880e27d643..1cb9dd06bc2770b4129c8ffc40e77c78f365b3f8 100644 (file)
@@ -1,10 +1,14 @@
 ---
-- hosts: hosts
+- hosts: hosts:!windows
   roles:
     # Setup filesystem and network configuration before other roles
     - zfs
     - netplan
+- hosts: hosts
+  roles:
     - common
+- hosts: hosts:!windows
+  roles:
     - libvirt
     - lxd
     - rasdaemon
index 2ef6c889f2455f39bc3028565e43bfd4a5b29627..5c81a81829c0c30f0808f4ed42d5707b7ce34dea 100644 (file)
     name: sshd
     start_mode: auto
     state: started
+- name: Allow Terminal Server connections
+  ansible.windows.win_regedit:
+    path: 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server'
+    name: 'fDenyTSConnections'
+    data: '0'
+    type: 'dword'
+- name: Run RDP automatically
+  ansible.windows.win_service:
+    name: 'TermService'
+    start_mode: 'auto'
+    state: 'started'
 - name: Turn off standy
   ansible.windows.win_command: 'C:\Windows\system32\powercfg.exe /change standby-timeout-ac 0'
 - name: Turn off hibernation
   ansible.windows.win_template:
     src: 'authorized_keys.j2'
     dest: 'c:\ProgramData\ssh\administrators_authorized_keys'
-
+# c.f. https://galaxy.ansible.com/ui/repo/published/community/windows/content/module/win_firewall_rule/
+- name: Firewall rule to alloc ICMP v4 on all type codes
+  community.windows.win_firewall_rule:
+    name: ICMP Allow incoming V4 echo request
+    enabled: true
+    state: present
+    profiles:
+      - domain
+      - private
+      - public
+    action: allow
+    direction: in
+    protocol: icmpv4
+    icmp_type_code: '*'
+- name: Firewall rule to allow RDP on TCP port 3389
+  community.windows.win_firewall_rule:
+    name: Remote Desktop
+    localport: 3389
+    action: allow
+    direction: in
+    protocol: tcp
+    profiles:
+      - domain
+      - private
+    state: present
+    enabled: true
 - name: Reboot if domain changed
   when: domain_state.reboot_required
   ansible.windows.win_reboot:
index 649feecbb0a8ffc50c4c992035a94ffe2aad971f..583571d483c778ecd07fd39fbb3e84b9c7d9cea4 100644 (file)
@@ -3,3 +3,6 @@ collections:
   - name: community.general
     version: '>=5.4.0'
     type: galaxy
+  - name: community.windows
+    version: '>=2.2.0'
+    type: galaxy
index e2806277c20828691fba1232295d52192f231e9d..1bca69cb20aeca549d38f238c599ea762170ff5f 100644 (file)
 
     publishers:
       - archive:
-          artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out'
+          artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out,check-include-guards.out'
           allow-empty: false
       - workspace-cleanup: *babeltrace_publisher_workspace-cleanup_defaults
 
     publishers:
       - workspace-cleanup: *babeltrace_publisher_workspace-cleanup_defaults
       - archive:
-          artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out'
+          artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out,check-include-guards.out'
           allow-empty: false
       - ircbot: *babeltrace_publisher_ircbot_defaults
       - email-ext: *babeltrace_publisher_email-ext_defaults
index 28fcf9b92d9201685ec747faca53fd081d422088..2e2d9148bad1d2a43915567b760720e86b5a2020 100644 (file)
           platforms: !!python/tuple [deb12-amd64]
           target_boards: !!python/tuple ["unix", "native-gdbserver", "native-extended-gdbserver"]
       - 'binutils-gdb_{version}_macosbuild':
-          platforms: !!python/tuple [macos-amd64, macos-arm64]
+          platforms: !!python/tuple [macos-arm64]
           target_boards: !!python/tuple ["unix"]
 
 - project:
index e09324cbc35cdb48b2bbb68f22b8e44fc5cf7f28..12900c74fe0e07c66ce6c649e9dd85fa31df4ec6 100755 (executable)
@@ -70,6 +70,25 @@ verne() {
     [ "$res" -ne "0" ]
 }
 
+mktemp_compat() {
+    case "$platform" in
+        macos*)
+            # On MacOSX, mktemp doesn't respect TMPDIR in the same way as many
+            # other systems. Use the final positional argument to force the
+            # tempfile or tempdir to be created inside $TMPDIR, which must
+            # already exist.
+            if [ -n "${TMPDIR}" ] ; then
+                mktemp "${@}" "${TMPDIR}/tmp.XXXXXXXXXX"
+            else
+                mktemp "${@}"
+            fi
+        ;;
+        *)
+            mktemp "${@}"
+        ;;
+    esac
+}
+
 print_header() {
     set +x
 
@@ -327,7 +346,7 @@ oot)
     print_header "Build: Out of tree"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
@@ -342,7 +361,7 @@ dist)
     $MAKE dist
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     # Extract the distribution tar in the build directory,
@@ -357,14 +376,14 @@ oot-dist)
     print_header "Build: Distribution Out of tree"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     # Run configure out of tree and generate the tar file
     "$SRCDIR/configure" || failed_configure
     $MAKE dist
 
-    dist_srcdir="$(mktemp -d)"
+    dist_srcdir="$(mktemp_compat -d)"
     cd "$dist_srcdir"
 
     # Extract the distribution tar in the new source directory,
@@ -372,7 +391,7 @@ oot-dist)
     $TAR xvf "$builddir"/*.tar.* --strip 1
 
     # Create and enter a second temporary build directory
-    builddir="$(mktemp -d)"
+    builddir="$(mktemp_compat -d)"
     cd "$builddir"
 
     # Run configure from the extracted distribution tar,
index e17799012f0686e8fe1753d246defc306b935577..a535a81874f17599a83d5e5cd51e2aec18cbd689 100755 (executable)
@@ -69,4 +69,8 @@ if [[ -f tools/shellcheck.sh ]]; then
     tools/shellcheck.sh | tee ../../shellcheck.out || exit_code=1
 fi
 
+if [[ -f tools/check-include-guards.sh ]]; then
+    tools/check-include-guards.sh | tee ../../check-include-guards.out || exit_code=1
+fi
+
 exit $exit_code
index e96422081d81eccc5dadad6de6fe1f3cdbc0150e..3d7c561a477f60e75105289a7c2f9ca803a8fe5a 100755 (executable)
 
 set -exu
 
+mktemp_compat() {
+    case "$platform" in
+        macos*)
+            # On MacOSX, mktemp doesn't respect TMPDIR in the same way as many
+            # other systems. Use the final positional argument to force the
+            # tempfile or tempdir to be created inside $TMPDIR, which must
+            # already exist.
+            if [ -n "${TMPDIR}" ] ; then
+                mktemp "${@}" "${TMPDIR}/tmp.XXXXXXXXXX"
+            else
+                mktemp "${@}"
+            fi
+        ;;
+        *)
+            mktemp "${@}"
+        ;;
+    esac
+}
+
+print_header() {
+    set +x
+
+    local message=" $1 "
+    local message_len
+    local padding_len
+
+    message_len="${#message}"
+    padding_len=$(( (80 - (message_len)) / 2 ))
+
+    printf '\n'; printf -- '#%.0s' {1..80}; printf '\n'
+    printf -- '-%.0s' {1..80}; printf '\n'
+    printf -- '#%.0s' $(seq 1 $padding_len); printf '%s' "$message"; printf -- '#%.0s' $(seq 1 $padding_len); printf '\n'
+    printf -- '-%.0s' {1..80}; printf '\n'
+    printf -- '#%.0s' {1..80}; printf '\n\n'
+
+    set -x
+}
+
 failed_configure() {
     # Assume we are in the configured build directory
     echo "#################### BEGIN config.log ####################"
@@ -264,7 +302,7 @@ case "$build" in
     echo "Out of tree build"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
index cc4d15c85462a00b004b7eeb8a3de9b6157bd13e..d7ae0d1641d75edf6c52d0a8935f4d681cca79bc 100755 (executable)
@@ -61,6 +61,25 @@ verne() {
     [ "$res" -ne "0" ]
 }
 
+mktemp_compat() {
+    case "$platform" in
+        macos*)
+            # On MacOSX, mktemp doesn't respect TMPDIR in the same way as many
+            # other systems. Use the final positional argument to force the
+            # tempfile or tempdir to be created inside $TMPDIR, which must
+            # already exist.
+            if [ -n "${TMPDIR}" ] ; then
+                mktemp "${@}" "${TMPDIR}/tmp.XXXXXXXXXX"
+            else
+                mktemp "${@}"
+            fi
+        ;;
+        *)
+            mktemp "${@}"
+        ;;
+    esac
+}
+
 print_header() {
     set +x
 
@@ -268,7 +287,7 @@ oot)
     print_header "Build: Out of tree"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
@@ -283,7 +302,7 @@ dist)
     $MAKE dist
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     # Extract the distribution tar in the build directory,
@@ -298,14 +317,14 @@ oot-dist)
     print_header "Build: Distribution Out of tree"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     # Run configure out of tree and generate the tar file
     "$SRCDIR/configure" || failed_configure
     $MAKE dist
 
-    dist_srcdir="$(mktemp -d)"
+    dist_srcdir="$(mktemp_compat -d)"
     cd "$dist_srcdir"
 
     # Extract the distribution tar in the new source directory,
@@ -313,7 +332,7 @@ oot-dist)
     $TAR xvf "$builddir"/*.tar.* --strip 1
 
     # Create and enter a second temporary build directory
-    builddir="$(mktemp -d)"
+    builddir="$(mktemp_compat -d)"
     cd "$builddir"
 
     # Run configure from the extracted distribution tar,
index c241e7ba9d256cb86bf238c1449bcfc87a34c3ea..bb2b6b59e085e603b5c399c335469c299753468c 100755 (executable)
@@ -63,6 +63,25 @@ verne() {
     [ "$res" -ne "0" ]
 }
 
+mktemp_compat() {
+    case "$platform" in
+        macos*)
+            # On MacOSX, mktemp doesn't respect TMPDIR in the same way as many
+            # other systems. Use the final positional argument to force the
+            # tempfile or tempdir to be created inside $TMPDIR, which must
+            # already exist.
+            if [ -n "${TMPDIR}" ] ; then
+                mktemp "${@}" "${TMPDIR}/tmp.XXXXXXXXXX"
+            else
+                mktemp "${@}"
+            fi
+        ;;
+        *)
+            mktemp "${@}"
+        ;;
+    esac
+}
+
 print_header() {
     set +x
 
@@ -399,7 +418,7 @@ oot)
     print_header "Build: Out of tree"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
@@ -415,7 +434,7 @@ dist)
     $MAKE dist
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     # Extract the distribution tar in the build directory,
@@ -430,14 +449,14 @@ oot-dist)
     print_header "Build: Distribution Out of tree"
 
     # Create and enter a temporary build directory
-    builddir=$(mktemp -d)
+    builddir=$(mktemp_compat -d)
     cd "$builddir"
 
     # Run configure out of tree and generate the tar file
     "$SRCDIR/configure" "${DIST_CONF_OPTS[@]}" || failed_configure
     $MAKE dist
 
-    dist_srcdir="$(mktemp -d)"
+    dist_srcdir="$(mktemp_compat -d)"
     cd "$dist_srcdir"
 
     # Extract the distribution tar in the new source directory,
@@ -445,7 +464,7 @@ oot-dist)
     $TAR xvf "$builddir"/*.tar.* --strip 1
 
     # Create and enter a second temporary build directory
-    builddir="$(mktemp -d)"
+    builddir="$(mktemp_compat -d)"
     cd "$builddir"
 
     # Run configure from the extracted distribution tar,
This page took 0.048824 seconds and 4 git commands to generate.