Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .azure-pipelines/posix-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,21 @@ steps:
- script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash)
displayName: 'Publish code coverage results'

- script: |
DEVICE=$(df . | tail -n +2 | awk '{print $1}')
sudo tune2fs -l $DEVICE | grep -w "Default mount options"
mount | grep -w $DEVICE
getfacl .
displayName: Check ACLs

- script: setfacl -b .
displayName: Clear ACLs

- ${{ if ne(parameters.coverage, 'true') }}:
- script: make pythoninfo
displayName: 'Display build info'

- script: $COMMAND buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
- script: $COMMAND buildbottest TESTOPTS="-uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
displayName: 'Tests'
env:
${{ if eq(parameters.xvfb, 'true') }}:
Expand All @@ -66,6 +75,12 @@ steps:
displayName: 'Run patchcheck.py'
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))

- task: PublishBuildArtifacts@1
inputs:
pathToPublish: $(build.binariesDirectory)/tarfile
artifactName: tarfile
condition: succeededOrFailed()


- task: PublishTestResults@2
displayName: 'Publish Test Results'
Expand Down
4 changes: 2 additions & 2 deletions .azure-pipelines/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- job: macOS_PR_Tests
displayName: macOS PR Tests
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
condition: false # and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

variables:
testRunTitle: '$(system.pullRequest.TargetBranch)-macos'
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- job: Windows_PR_Tests
displayName: Windows PR Tests
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
condition: false #and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: vs2017-win2016
Expand Down
22 changes: 16 additions & 6 deletions Lib/test/test_tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1409,17 +1409,27 @@ def test_stream_padding(self):
def test_file_mode(self):
# Test for issue #8464: Create files with correct
# permissions.
import os, time, signal
pid = os.getpid()
os.mkdir(os.getenv("BUILD_BINARIESDIRECTORY") + "/tarfile")
os.system("sudo strace -p %d 2>$BUILD_BINARIESDIRECTORY/tarfile/strace.out &" % pid)
time.sleep(2) # get strace heaps of time to start

if os.path.exists(tmpname):
support.unlink(tmpname)

original_umask = os.umask(0o022)
try:
tar = tarfile.open(tmpname, self.mode)
tar.close()
mode = os.stat(tmpname).st_mode & 0o777
self.assertEqual(mode, 0o644, "wrong file permissions")
original_umask = os.umask(0o022)
try:
tar = tarfile.open(tmpname, self.mode)
tar.close()
mode = os.stat(tmpname).st_mode & 0o777
self.assertEqual(mode, 0o644, "wrong file permissions")
finally:
os.umask(original_umask)
finally:
os.umask(original_umask)
time.sleep(5)
os.kill(os.getpid(), signal.SIGKILL)

class GzipStreamWriteTest(GzipTest, StreamWriteTest):
pass
Expand Down