#!/bin/sh global test_description := ''credential-cache tests'' source ./test-lib.sh source "$TEST_DIRECTORY"/lib-credential.sh test -z $NO_UNIX_SOCKETS || do { global skip_all := ''skipping credential-cache tests, unix sockets not available'' test_done } # don't leave a stale daemon running trap 'code=$?; git credential-cache exit; (exit $code); die' EXIT helper_test cache helper_test_timeout cache --timeout=1 # we can't rely on our "trap" above working after test_done, # as test_done will delete the trash directory containing # our socket, leaving us with no way to access the daemon. git credential-cache exit test_done (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"credential-cache tests">)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(.)} {(DQ ($ VSub_Name "$TEST_DIRECTORY")) (/lib-credential.sh)}) (AndOr children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name "$NO_UNIX_SOCKETS"))}) (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:skip_all) op: Equal rhs: {(SQ <"skipping credential-cache tests, unix sockets not available">)} spids: [34] ) ] spids: [34] ) (C {(test_done)}) ] spids: [31] ) ] op_id: Op_DPipe ) (C {(trap)} {(SQ <"code=$?; git credential-cache exit; (exit $code); die">)} {(EXIT)}) (C {(helper_test)} {(cache)}) (C {(helper_test_timeout)} {(cache)} {(--timeout) (Lit_Other "=") (1)}) (C {(git)} {(credential-cache)} {(exit)}) (C {(test_done)}) ] )