1
0

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

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