From 45d88b1f3feafe90cdf0c743c87aa49aebd72720 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 26 May 2019 12:14:31 +0100 Subject: [PATCH] issue #587: attempt to fix Mac Azure job --- .ci/prep_azure.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.ci/prep_azure.py b/.ci/prep_azure.py index 296355aa..a7d8bc67 100755 --- a/.ci/prep_azure.py +++ b/.ci/prep_azure.py @@ -7,27 +7,28 @@ import ci_lib batches = [] -batches += [ - [ - "sudo chown `whoami`: ~", - "chmod u=rwx,g=rx,o= ~", +if os.uname()[0] == 'Linux': + batches += [ + [ + "sudo chown `whoami`: ~", + "chmod u=rwx,g=rx,o= ~", - "sudo mkdir /var/run/sshd", - "sudo /etc/init.d/ssh start", + "sudo mkdir /var/run/sshd", + "sudo /etc/init.d/ssh start", - "mkdir -p ~/.ssh", - "chmod u=rwx,go= ~/.ssh", + "mkdir -p ~/.ssh", + "chmod u=rwx,go= ~/.ssh", - "ssh-keyscan -H localhost >> ~/.ssh/known_hosts", - "chmod u=rw,go= ~/.ssh/known_hosts", + "ssh-keyscan -H localhost >> ~/.ssh/known_hosts", + "chmod u=rw,go= ~/.ssh/known_hosts", - "cat tests/data/docker/mitogen__has_sudo_pubkey.key > ~/.ssh/id_rsa", - "chmod u=rw,go= ~/.ssh/id_rsa", + "cat tests/data/docker/mitogen__has_sudo_pubkey.key > ~/.ssh/id_rsa", + "chmod u=rw,go= ~/.ssh/id_rsa", - "cat tests/data/docker/mitogen__has_sudo_pubkey.key.pub > ~/.ssh/authorized_keys", - "chmod u=rw,go=r ~/.ssh/authorized_keys", + "cat tests/data/docker/mitogen__has_sudo_pubkey.key.pub > ~/.ssh/authorized_keys", + "chmod u=rw,go=r ~/.ssh/authorized_keys", + ] ] -] if ci_lib.have_apt(): batches.append([