Python 3: print function in a shell oneliner in Makefile

Fixes

    File "<string>", line 1
      import string,random; print 'ansible-testing-' + ''.join(random.choice(string.ascii_letters + string.digits) for _ in xrange(8));
                                                   ^
  SyntaxError: invalid syntax

when running integration tests with

  . hacking/env-setup
  . .tox/py35/bin/activate
  make -C test/integration test_var_precedence
This commit is contained in:
Marius Gedminas 2015-10-16 17:41:01 +03:00
parent 38b99a7a4d
commit 04a7ef416e

View file

@ -3,7 +3,7 @@ VARS_FILE ?= integration_config.yml
# Create a semi-random string for use when testing cloud-based resources # Create a semi-random string for use when testing cloud-based resources
ifndef CLOUD_RESOURCE_PREFIX ifndef CLOUD_RESOURCE_PREFIX
CLOUD_RESOURCE_PREFIX := $(shell python -c "import string,random; print 'ansible-testing-' + ''.join(random.choice(string.ascii_letters + string.digits) for _ in xrange(8));") CLOUD_RESOURCE_PREFIX := $(shell python -c "import string,random; print('ansible-testing-' + ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(8)));")
endif endif
CREDENTIALS_FILE = credentials.yml CREDENTIALS_FILE = credentials.yml