Bug 8861

Summary: System envs in /etc/profile are not injected in oeqa ssh connection
Product: [QA/Testing] Runtime Testing Reporter: dawei <daweix.wu>
Component: generalAssignee: Ross Burton <ross.burton>
Status: CLOSED WONTFIX QA Contact: Costin <costin.c.constantin>
Severity: major    
Priority: Medium+ CC: cathy.shen
Version: 2.0   
Target Milestone: 2.1 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description dawei 2015-12-24 08:43:17 UTC
There is only PATH in ssh connection . So for some tests like nodejs , all cases will fail since it can not find node module wihout NODE_PATH which is defined in /etc/profile. 

ssh log like this:

[Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR 192.168.8.60 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; cd /tmp/iotivityjsapis/; /tmp/nodeunit-master/bin/nodeunit /tmp/iotivityjsapis/test_oic_client.js -t testOicClientHasCancelObservingPromise
module.js:338
    throw err;
          ^
Error: Cannot find module 'iotivity-node'
Comment 1 Cathy Shen 2015-12-25 01:37:04 UTC
Hi Ross,
Noticed you submitted a path 20 days ago which might introduce this issue, will you guide how to get NODE_PATH included based on your solution?

https://github.com/otcshare/iot-os/commit/30d5ed65af9bf67d00985b93d3ce24796ffbfa38

Thanks,
Cathy
Comment 2 Ross Burton 2016-02-12 15:30:59 UTC
Why can't your test case set NODE_PATH directly if that's a required value?

/etc/profile is for *interactive* shells and sshing in for automated testing doesn't count as an interactive shell (you can take that up with SSH maintainers, not me) which is why we removed the sourcing of profile.
Comment 3 Cathy Shen 2016-02-15 02:18:14 UTC
Thanks, Ross.