1
0

0.4.27-8-g3794a39.docker-test-cleanup.patch 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. Subject: Docker test cleanup
  2. Origin: upstream, commit 0.4.27-8-g3794a39 <https://github.com/ahupp/python-magic/commit/0.4.27-8-g3794a39>
  3. Author: Adam Hupp <adam@hupp.org>
  4. Date: Mon Oct 24 08:20:54 2022 -0700
  5. --- a/test/docker/alpine
  6. +++ b/test/docker/alpine
  7. @@ -3,5 +3,3 @@
  8. WORKDIR /python-magic
  9. COPY . .
  10. RUN python3 -m pip install tox
  11. -CMD python3 -m tox
  12. -
  13. --- a/test/docker/archlinux
  14. +++ b/test/docker/archlinux
  15. @@ -1,5 +1,6 @@
  16. FROM archlinux:latest
  17. RUN yes | pacman -Syyu --overwrite '*'
  18. -RUN yes | pacman -S python python2 file which
  19. -COPY . /python-magic
  20. -CMD cd /python-magic/test && python3 ./run.py
  21. +RUN yes | pacman -S python python-pip file which
  22. +WORKDIR /python-magic
  23. +COPY . .
  24. +RUN python3 -m pip install tox
  25. --- a/test/docker/bionic
  26. +++ b/test/docker/bionic
  27. @@ -1,9 +1,8 @@
  28. FROM ubuntu:bionic
  29. -WORKDIR /python-magic
  30. -COPY . .
  31. RUN apt-get update
  32. RUN apt-get -y install python python3 locales python3-pip libmagic1
  33. RUN locale-gen en_US.UTF-8
  34. -RUN python3 -m pip install tox
  35. -CMD python3 -m tox
  36. +WORKDIR /python-magic
  37. +COPY . .
  38. +RUN python3 -m pip install tox
  39. --- a/test/docker/centos7
  40. +++ b/test/docker/centos7
  41. @@ -1,9 +1,8 @@
  42. FROM centos:7
  43. RUN yum -y update
  44. RUN yum -y install file-devel python3 python2 which
  45. +ENV SKIP_FROM_DESCRIPTOR=1
  46. +
  47. WORKDIR /python-magic
  48. COPY . .
  49. RUN python3 -m pip install tox
  50. -ENV SKIP_FROM_DESCRIPTOR=1
  51. -CMD python3 -m tox
  52. -
  53. --- a/test/docker/centos8
  54. +++ b/test/docker/centos8
  55. @@ -4,8 +4,7 @@
  56. RUN yum reinstall glibc-common -y && \
  57. localedef -i en_US -f UTF-8 en_US.UTF-8 && \
  58. echo "LANG=en_US.UTF-8" > /etc/locale.conf
  59. +
  60. WORKDIR /python-magic
  61. COPY . .
  62. RUN python3 -m pip install tox
  63. -CMD python3 -m tox
  64. -
  65. --- a/test/docker/focal
  66. +++ b/test/docker/focal
  67. @@ -1,9 +1,10 @@
  68. FROM ubuntu:focal
  69. -WORKDIR /python-magic
  70. -COPY . .
  71. RUN apt-get update
  72. RUN apt-get -y install python python3 locales python3-pip libmagic1
  73. RUN locale-gen en_US.UTF-8
  74. +
  75. +WORKDIR /python-magic
  76. +COPY . .
  77. RUN python3 -m pip install tox
  78. -CMD python3 -m tox
  79. +
  80. --- a/test/docker/xenial
  81. +++ b/test/docker/xenial
  82. @@ -1,9 +1,8 @@
  83. FROM ubuntu:xenial
  84. -WORKDIR /python-magic
  85. -COPY . .
  86. RUN apt-get update
  87. RUN apt-get -y install python python3 locales python3-pip libmagic1
  88. RUN locale-gen en_US.UTF-8
  89. -RUN python3 -m pip install tox
  90. -CMD python3 -m tox
  91. +WORKDIR /python-magic
  92. +COPY . .
  93. +RUN python3 -m pip install tox
  94. --- a/test/run_all_docker_test.sh
  95. +++ b/test/run_all_docker_test.sh
  96. @@ -6,8 +6,8 @@
  97. ROOT=$(dirname $0)/..
  98. cd $ROOT
  99. -for f in test/docker/*; do
  100. +for f in test/docker/*; do
  101. H=$(docker build -q -f ${f} .)
  102. - docker run --rm $H
  103. + docker run --rm $H python3 -m tox
  104. done