Bug 8861 - System envs in /etc/profile are not injected in oeqa ssh connection
Summary: System envs in /etc/profile are not injected in oeqa ssh connection
Status: CLOSED WONTFIX
Alias: None
Product: Runtime Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: 2.0
Hardware: x86 Multiple
: Medium+ major
Target Milestone: 2.1 M3
Assignee: Ross Burton
QA Contact: Costin
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-12-24 08:43 UTC by dawei
Modified: 2016-02-15 02:18 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.